jquery - Unexpected token ILLEGAL while creating table dynamically -
i trying create table dynamically , when doing getting in browser console uncaught syntaxerror: unexpected token illegal
this fiddle
http://jsfiddle.net/us8uc/3617/
my code
$(document).ready(function() { $(".tabs-menu a").click(function(event) { event.preventdefault(); $(this).parent().addclass("current"); $(this).parent().siblings().removeclass("current"); var tab = $(this).attr("href"); var html = '<table id="mytable">\ <thead>\ <tr>\ <th width="1%"></th>\ <th width="18.8%">name </th>\ <th width="18.8%">difference</th>\ <th width="18.8%">quantity</th>\ <th width="18.8%">volumne</th>\ <th width="10%">open</th> </tr>\ </thead>\ <tbody id="positivebody"></tbody>\ </table>' ; $(tab).html(html); $(".tab-content").not(tab).css("display", "none"); $(tab).fadein(); }); });
could please let me know how resolve
you're missing \
after <th width="10%">open</th>
this should <th width="10%">open</th>\
Comments
Post a Comment