Trying to use .click
with buttons to control the id of a div...
<button type="button" id="1" class="this">
first
</button>
<button type="button" id="2" class="this">
second
</button>
<div id="id1"></div>
<script>
jQuery(document).ready(function($) {
$('.this').click(function() {
$(this).attr('#id1', '#id2');
});
});
</script>
Just trying to learn jquery...
need to change the div id from id="id1"
to id="id2"
when the second button is clicked.