Lavalamp is an awesome jQuery plug-in that makes really cool effects for WordPress-based menus and navigation links, and as a bonus it is very lightweight. It can be a bit tricky to implement in WordPress, but after you read this tutorial hopefully you'll be implementing it with ease. Follow along and let's get your site's navigation using the jQuery lavalamp effect (super cool)!
jQuery, Lavalamp, Easing and WordPress
Ok so if you haven't yet you're going to need to download all the appropriate scripts to make this work and have a WordPress site ready to work with. I've provided download links at the bottom of this post for you or also you can get them here: jQuery 1.4.1 min, jQuery Lavalamp Plug-in, and jQuery Easing Plug-in.
Why Use Lavalamp jQuery Navigation?
Because it's cool and increases user experience while still being very SEO friendly and lightweight. I personally use the lavalamp navigation on my portfolio website: Lavalamp Example 1. Also, I recently implemented it on another website I built and recently launched: Lavalamp Example 2. As you can see the effect works well and is very user friendly. Now, let's look in to how to make it work.
Here's the official website for the jQuery plug-in here: jQuery Lavalamp Plugin Page
To get started you must have WordPress installed on a web server and some knowledge of web development, HTML, and jQuery. Ok, still ready? Now download the jQuery Easing Plug-in here: jQuery Easing Plug-in and also download the jQuery Lavalamp Plug-in Here (min version): jQuery Lavalamp Plug-in
Insert the following between the header tags
Please note that my syntax highlighter has added some extra characters in the links. You will want to change these links to either Google or your own hosted scripts anyways...
<!-- this is the code you're looking for here below for the lavalamp--> <link rel="stylesheet" href="http://www.devinwalker.net/wp-content/themes/devinwalker/jquerynav/lavalamp.css" type="text/css" media="screen" /> <!-- this script initiates the function change the #nav to your unordered list's ID -->
First, you will need to change in header the src='path/to' to a link to the appropriate path . The WordPress file to put this code in is title header.php and can typically be found in this location: mydomain/wp-content/themes/mytheme/header.php.
Further explanation: the second script after calling on jQuery is the Easing plug-in that makes this effect real smooth. The last script initiates the lavalamp function. You will need to change the '#nav' to your unordered list's ID if you are not using the same naming convention as I am.
Connecting to the WordPress Navigation
<ul class="lavaLampBottomStyle" id="nav">
<li><a href="http://www.devinwalker.net">Home</a></li>
<li class="page_item page-item-2"><a href="http://www.devinwalker.net/about/" title="About">About</a></li>
<li class="page_item page-item-3"><a href="http://www.devinwalker.net/hire-me/" title="Hire Me">Hire Me</a></li>
</ul>
Connecting this effect to a WordPress dynamic navigation is easy. Simply go into the header.php file and provide your navigational unordered list the appropriate class="LavaLampBottomStyle" naming and you're all set after you call on the appropriate scripts as mentioned above. Just an FYI, if you have a lot of other jQuery effects on page it could cause some problems with them... just experiment around with it. I've experienced minor issues, but nothing that's too hard to figure out (no roadblocks).
Example Menu
Below is an example of how this effect can be used anywhere on a site. Here you can see I've implemented it directly into a WordPress page using inline code. The links don't go anywhere for a reason, but they can easily be made to go anywhere you'd like.
As you can see this effect works well for site navigation, but can be used to create some other cool effects. Please let me know if you have trouble with this tutorial, I've tried to explain everything to the best of my ability. Leave a comment and subscribe to the RSS!
Resources for jQuery Scripts
Download: jQuery 1.4.1 min
Download: jQuery Lavalamp Plug-in
Download: jQuery Easing Plug-in
Download: jQuery Lavalamp Plug-in
Related posts:
- WordPress List Subpages Even if On Subpage I'm building a new site and the navigation on it requires me to use a different bit of code for parent and child pages. I thought I'd share the code for those out there building a similar navigation. Here's a handy bit of code that you can use to display all subpages on a subpage. [...]...
- WordPress: If URL is Homepage then do this… Question: In WordPress how to I make sure the page loaded is the homepage URL and display some data if the standard WordPress Conditional Tags are not working for my theme?! Answer: Here's a quick snippet of code that will give you an option to do something if these WordPress basic conditional tags are not [...]...
- GoDaddy WordPress Sites Infected by HolasionWeb Malicious Code Have you gotten calls from your clients hosted on GoDaddy about their WordPress site's being 'hacked'? Or perhaps this happened to you yourself. It seems there's a new report of thousands of WordPress sites being infected by malicious javascript inserted on their WordPress website. It's not everyday that WordPress gets 'hacked' by something/one. Today one [...]...
- jFlow Slider Auto Slider with Pause Functionality UPDATE: Please visit the new jFlow Plus article for the latest version's documentation, download and demo. The following article is no longer supported: Why jFlow is a Good Slider jFlow is a very light-weight slider. If you've been using sliders in your web design for some time perhaps you've had experiences with a few jQuery [...]...
- Easy Masked Input Forms I recently did some freelance work that required using masked forms on common field inputs: credit card information, phone numbers, dates, etc. To satisfy this request I used jQuery and meioMask - a jQuery plug-in. First off, click here to view the working demo or click the image below: To create a form similar to [...]...
-
Nigel Thomson
-
Jan
-
http:/www.dlocc.com Devin Walker
-
Jan
-
http://www.krishnasolanki.co.uk Krishna
-
http:/www.dlocc.com Devin Walker
-
sanksr
-
http://dkpat.net dkpat
-
http://www.frankmorin.org Frank Morin
-
Kjetterman






