I have an rss feed that spits out plain html so I want to be able to select an
<object> and add a class to it in order to be able to style it.
This is the jquery code I wrote but it seems to not be working.
$(document).ready(function(){
var vid = $("select[name=object]");
$(“vid”).addClass(“youtube”);
});
I am relatively new to using Jquery.
EDIT:
Figured it out:
$(document).ready(function(){
vid = $("object");
vid.addClass("youtube");
}
Thanks for the help guys!
try this. You already have the jquery object just call addClass off of it. Also I put single quotes around the value of your name attribute, not sure if this matters but it is good code convension none the less