I had implemented click a link which dynamic adding a tab but causes the whole page get reload. Is there anyone know what is the reason?
$(document).ready(function() {
var tabObj = $("#tabs").tabs({
add: function(event, ui) {
//select newely opened tab
tabObj.tabs('select',ui.index);
}, collapsible: true, cache: true});
// , fx: {opacity: "toggle", duration: "normal"}
//Dynamic add tab
$("#assignee").click(function(){
//alert("FFFFFFFF");
tabObj.tabs("add", "#noc","NOC");
//tabObj.tabs("select", "#noc");
});
});
Please help. Thanks.
Add a
return false;aftertabObj.tabs("add", "#noc","NOC");That should hopefully work. Not tested.