Я не настолько хорош в написании jQuery, но прошу прощения за наивный вопрос:
Я бы хотел поместить значение клика по ссылке в плагин backstretch jQ.(http://srobbin.com/jquery-plugins/jquery-backstretch/)
мой код выглядит следующим образом:
$(function() {
var bgImage = $('.active').attr("href"); //gets the value of the href on the a with the class 'active' and puts it in a variable.
$('.clicks a').click(function() {
$('.clicks a').removeClass('active');
$(this).addClass('active');
return false;
}) //removes all 'active' classes, and puts the 'active' class on the clicked a tag.
$.backstretch("bgImage", {speed: 150}); // uses the value the variable in this plugin.
}); //end.ready
Хотя это не работает, есть идеи?Заранее спасибо!