Hi, I just started playing with jquery yesterday and I'm interested in
assigning the css class of an <a> element to a variable and then
applying that class to a div in another section.

While I've been looking through multiple tutorials and searching on
the discussion board I haven't seen it.


i.e.
$("#exampleClass a").click(function()
     {
     var className = $(this).css("background-image");
     $("#TargetDiv").addClass(className);              // where
className is the variable
     });
});


Any guidance/help would be much appreciated!


Reply via email to