jQuery - removeClass 'current' when loading JPlayer -
what missing here? i'm trying remove class "jp-playlist-current" href upon loading page. don't want 'current' style when page loads. want 'current' displayed when user clicks on link.
unfortunately, since code dynamically populated, can't give static view of class. instead, take @ screenshot image below posted @ link:
http://dixiedevils.com/code.jpg
and here full code page:
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled</title> <script type="text/javascript"> $(document).ready(function(){ $('div.jp-type-playlist div.jp-playlist li.jp-playlist-current a').removeclass('jp-playlist-current'); //$('div.jp-type-playlist div.jp-playlist li').removeclass('jp-playlist-current'); }); </script> </head> <body> <div id="jquery_jplayer_1" class="jp-jplayer"></div> <div id="jp_container_1" class="jp-audio"> <div class="jp-type-playlist"> <div class="jp-playlist"> <ul> <!-- below here dynamic jq content placed: --> <li></li> </ul> </div> </div> </div> </body> </html>
$("#jp_container_1 .jp-type-playlist .jp-playlist li").find('a').each(function(){ $(this).removeclass('jp-playlist-current'); });
Comments
Post a Comment