if i click on save button with out data shawing validation on fields and moving to the perticular tab which feild is empty in tab
function SaveValidations() {
debugger
var code = $("#UserDetailModel_Code").val();
if (code == "" || code == "0") {
//$('basicDetails').removeClass('active');
//$('branchDetails').addClass('active');
//var active_tab_selector = $('.nav-tabs > li.active > a').attr('basicDetails');
var target_tab_selector = $(this).attr('basicDetails');
//$(target_tab_selector).addClass('active');
$(target_tab_selector, '.nav-tabs > .active').prev('li').find('a').trigger('click');
//$(active_tab_selector).addClass('hide');
//$('basicDetails').addClass('active');
//var maptab = document.getElementById('basicDetails');
//maptab.className = maptab.className + ' active';
alert("Please Enter Code.");
//$("#basicDetails").focus();
//$("#tabs").tabs({ active: "#basicDetails" });
//$('#tabs a[href="#basicDetails"]').tab('show');
$("#UserDetailModel_Code").focus();
return false;
}
var name = $("#UserDetailModel_Name").val();
if (name == "" || name == "0") {
alert("Please Enter Name.");
$("#UserDetailModel_Name").focus();
return false;
}
var referedBy = $("#UserDetailModel_ReferredBy").val();
if (referedBy == "" || referedBy == "0") {
alert("Please Enter Refered By.");
$("#UserDetailModel_ReferredBy").focus();
return false;
}
}