jQuery fans blog and community sharing news, plugins, video tutorials, demos and more.

Dynamic Update of Alt Tags on Hover

Proof of concept for changing alt tags/title tags on hover dynamically it gets picked up automatically by browsers and displayed as the usual “alt/title tooltip”. There is obviously no benefit to SEO using this but was good to prove it works. Check out me fiddle…

Continue reading →

jQuery Snippet Capture Horizontal Scroll

Just a jQuery Code Snippet to Capture Horizontal Scrolling. //capture horizontal scroll $(window).bind(’scroll’, function() {      //check if it’s hit the leftmost scroll point     if ($(document).scrollLeft() == 0)     {           //scroll horizontal     } });

Continue reading →

Add set value of select box using url param

jQuery code snippet to add/set value of select box using a supplied url parameter. <script lang="text/javascript"> jQuery(document).ready(function() {     $.urlParam = function(name){         var results = new RegExp(’[\\?&amp;]‘ + name + ‘=([^&amp;#]*)’).exec(window.location.href);         return results[1] || 0;  …

Continue reading →

jQuery .each() skip to next one

Workaround jQuery code snippet to skip next interation in a loop. Just documenting this code snippet, no demo sorry. //output keys=values. eg [1]=[2], [3]=[4] etc, skips undefined keys var i = 0; $.each(array, function(key, val) {     if (webTrendsParams[i]) {        …

Continue reading →

Generating Random Color Values using JavaScript

JavaScript Code snippet to generate a random RGB color. Could be useful for supplying color values to transitions to/from with a single line of code. See Demo var hue = ‘rgb(‘ + (Math.floor(Math.random() * 256)) + ‘,’ + (Math.floor(Math.random() * 256)) + ‘,’ + (Math.floor(Math.random()…

Continue reading →

Page 5 of 50 ←; First ... 3 4 5 6 7 ... Last →
scroll to top