-
-
CommentAuthoruberlemurguy
- CommentTime7 days ago
I am working with Ubercart and Drupal and I would like a javascript code that would change the class names of the product image from nothing to "reflect" the path to the img tag I want the class applied to is at
div.product_image a.thickbox img
I am a JS newbie so I would like some help!
Thanks! -
-
- CommentAuthoroeb
- CommentTime7 days ago
Take a look at jquery http://www.jquery.com
The following code should do this
$(document).ready(function() {
$("div.product_image a.thickbox img").addClass("classname");
});
That should do it for you. (Replace classname with the class you want applied. -
-
CommentAuthoruberlemurguy
- CommentTime6 days ago
WOW! AMAZING! Thank you so much! Fortunately I already needed jQuery for my site so I didn't have to tack on a massive library just for this! Thanks! -
1 to 3 of 3
