javascript - Dynamically adding JQUERY tabs, getting "Uncaught SyntaxError: Unexpected token ILLEGAL" -
i'm pretty sure there's error in 1 of strings, can't find it. goal of code dynamically add facebook comments plugin tabs depending on episode of show work listening to.
$('body').attr('id', 'tabs'); $( "#tabs" ).tabs(); $('#tabs').ready(function(){discussion(222); }); function discussion(episodenumber){ var tabnum =$('#tabs').size('a') + 1; console.log(tabnum); $('#tabs').append('<div id=\"#tabs-'+tabnum+'\">'+episodenumber+'</a></li>'); $('#tabs-'+tabnum).ready(function(episodenumber,tabnum){$('#tabs-'+tabnum).append('<p><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_us/all.js#xfbml=1\"></script><fb:comments href=\"http://www.facebook.com/l.php?u=http%3a%2f%2fwww.foo.com%2fepisodes%2ffoo_foo_foo-'+episodenumber+'.php&h=baqcj6ihg\" num_posts=\"10\" width=\"50\"></fb:comments></p>'); }); }
thanks!
per documentation @ http://jqueryui.com/demos/tabs/, can add tab way:
$('#tabs').tabs('add',null,'tab label', indexid);
see http://jqueryui.com/demos/tabs/#method-add more info.
Comments
Post a Comment