jquery - is it possible to set javascript:void(0) with #map for tabs in href? -
i want set javascript:void(0) #map tabs in h ref. want set javascript:void(0) responsible not load webpage on click. #map tab .so want set both javascript:void(0) , #map. code
<li><a data-toggle="tab" href="#map" href="javascript:void(0)" onclick="getvalue('+val['product_id']+');" id="maptab">map</a></li>
no need use both can use .preventdefault()
when write javascript function <a>
.
$('li a').click(function(e){ e.preventdefault(); //... other code of function })
.preventdefault()
prevents default function of element. page load prevented this.
Comments
Post a Comment