Jquery custom attribute
From John Freier
Revision as of 09:47, 11 August 2011 by Jfreier (Talk | contribs) (Created page with 'Use a custom attribute on an HTML tag and manipulate it in JQuery. <script> $(document).ready(function() { $('a').click(function() { var id = $(this).attr('g…')
Use a custom attribute on an HTML tag and manipulate it in JQuery.
<script> $(document).ready(function() { $('a').click(function() { var id = $(this).attr('goto'); alert(id); }); }); </script> <a href="#" goto="8">Click Here</a>