Using a custom variable in a 3rd party jQuery plugin -


I'm still not so great in writing jQuery that I forgive the naive question:

I like this to give the value of the href clicked in the backstrech juke plugin ()

My code looks like this:

  $ (function () {Var bgImage = $ ('active'). Attr ("href"); / / class receives the value of the AR with 'active' and puts it in a variable. $ ('Clicks' ). Click (function () {$ ('. RemoveClass ('active'); $ (this) .Andclass ('active'); return;}) // removes all 'active' sections, and 'active' squares on clicked tags $ .backstrechach ("BGImage", {Speed: 150}); // uses the variable in this plugin.}); //end.ready   

Although this is not working, any thoughts? thank you in advanced!

OK, I got it. In this way I have done this by thinking of anyone:

  $ (function () {$ .backstretch ("& lt ;? php bloginfo ('template_url') ;? & gt; / Images / tn_bg2 $ ('click'). (Function () {var happy = $ (this) .attr ('href'); $ (this). FadeIn ('slow', function () { $ ("# Backstretch img"). Etr ("src", happy);}); return false;});}); //end.ready    

Comments