I am trying to select :nth-child using jquery, but it shows a syntax error.
Error: Syntax error, unrecognized expression: :nth-child
Here is my code
var i; jQuery('#' + id + ' .tab-pane').each(function (id, t) { var n = jQuery(this).attr('id', 'pane-' + t); var p_id = n.attr('id'); jQuery('#' + id + ' .nav-tabs li:nth-child(' + i + ') a').attr('href', p_id); i++; });
please check my code is missing here.
source share