Difference between revisions of "Jquery custom attribute"
From John Freier
(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…') |
(No difference)
|
Latest revision as of 09:47, 11 August 2011
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>