Archive for the ‘jQuery’ Category

Really Great jQuery plugins for Drupal

Anyone who has ever developed with Drupal will know that jQuery was an amazing addition to the Drupal toolkit as of Drupal 5, but you have to be a developer to make use of Drupal as there’s already a great selection of modules using some great jQuery plugins. I love thi features!

jCarousel Lite
This great little [...]

Continue Reading..
Posted in JavaScript, Programming, jQuery

Changing picture source (src) with jQuery

< img src=”images/picture_1.jpg” onclick=”changeMe(this)” />

And our jQuery code will look like this:
function changeMe(item)
{
///get the src value
var im = $(item).attr(“src”);
///replace src value with something else
im = im.replace(“_1.”,”_2.”);
///assign changed src value to the src attribute
$(item).attr(“src”,im);
}

Well, easy as pie. With $(thing).attr function, you can change any attribute in html tag, which is very hadny when manipulating with tags [...]

Continue Reading..
Posted in Uncategorized