I'm unsure of the syntax, and can't seem to get it to work in the example below. The code as written works.
var nameOf = "2005JanQ1";
$('div[name=2005JanQ1]').toggle( "slow", function(){
alert("done");
});
However, I'd like to use:
var nameOf = "2005JanQ1";
$('div[name=nameOf]').toggle( "slow", function(){
alert("done");
});
This does not work. And I'm unsure why. Any help is greatly appreciated.