I am using nested iscroll4 but the onclick event on
<li>
<div class="pullContainer">
<div class="wraps" id="w1">
<div class="scrolls" id="sc1">
<div id="pullDown1" class="pullDowns">
<span class="pullDownIcon"></span>
<span class="pullDownLabel1">Pull down to refresh...</span>
</div>
<div class="scrollContainer" id="nearBy"></div>
<!-- Template container -->
<script id="myTemplate" type="text/x-jquery-tmpl">
{{if (data.length > 0)}}
<ul class = "forSmooth" id="nearbyList">
{{each data}}
<li class = "smooth" data-businessId = "${$value.id}" data-distance = "${$value.distance}" data-prev-page ="homePage" onclick = "alert('hi');">
Here the alert is firing two times...So how can i prevent this by firing second time.
try this :
Note : Totally untested code