setDataTab

function setDataTab(menuItem, contentItem) { var counter = 1; menuItem.each(function(index, el) { $(this).attr('data-tab', counter); counter++; }); // end each counter = 1; // reset counter value contentItem.each(function(index, el) { $(this).attr('data-tab', counter); counter++; }); // end each }
setDataTab

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.