/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function showContent(id) { var items = ['estore','marketplace','favourites']; // Highlight Selected Buttons $.each( items, function(key, value){ if(value != id) { $('#'+value).removeClass('selected'); $('#my_'+value).css('display','none'); }else{ $('#'+id).addClass('selected'); $('#my_'+id).css('display','block'); } }); }