jQuery - Marking Current Link Active

Have you ever wanted to have a link show as “Active” when a users is on that link? If you have a navigation at the top of your site and you want to visually indicate that the visitor is on that link, then you would usually add and “active” class to that link and style it appropriately. This little snippet of code will do that. <code> $(document).ready(function(){ var path = location.

jQuery selector takes a second argument that sets context.

I was trying to concatenate a select to the almighty this in jQuery, but it just wasn’t working. I tried $(this + 'input') Didn’t work, so I thought, maybe I need a space between this and input like so: $(this + ' input') No go.. Then I ran across this page. http://stackoverflow.com/questions/306583/jquery-this-selector-and-children Of course StackOverFlow has the answer. The working result $('input', this) Perfect!!!

Developing in jQuery? Use $.dump instead of alert

I just ran into the $.dump jQuery plugin. It sure makes troubleshooting and figuring out jQuery a whole lot easier. Here is how you include it in your page. Download the plugin at here Include it in your HTML like so <script type="text/javascript" src="jquery.dump.js"></script> Now just include $.dump(object) somewhere and replace object with an object you want more information on The pop-window you will get

Jquery Slideshow Plugin for Drupal

I am now a module maintainer for a Drupal plugin I wrote (Jquery Slideshow). It takes CCK Imagefields and creates a nice JavaScript slide show from them using the Cycle plugin for Jquery. It took some time to write, but it’s not that complicated of a module. The module has some settings for using Imagecache and different types and speeds of transitions. Currently it only works on Drupal 5 with Imagecache 1.