Do anyone has similar experience? I would like to get the custom parameter when I click on the image rather than only the id. I got undefined for second alert(this.ads), how can I get the number 2 from this parameter?
HTML
<section id="home" data-role="page">
<article data-role="content">
<div id="home-content">Home Content here <a href="#tab-3" data-transition="slide">Goto Tab-3</a>
<div id="tab-3-list">
<div class="ui-grid-a">
<div class="ui-block-a">
<img id="c02" ads="2" class="coupon_list" src="/images/coupon/c02.png">
</div>
</div>
<!-- /ui-grid-a -->
</div>
<!-- /tab-3-list -->
</div>
</article>
<!-- content -->
</section>
<!-- home -->
Javascript
$(document).ready(function () {
$("#tab-3-list img.coupon_list").on("click", function (e) {
e.preventDefault();
alert(this.id);
alert(this.ads);
});
});