Very new to this and stuck with the onClick team, and it puzzled me.
What should happen: The user clicks on the text of the shopping cart (in the div element that was in style) and opens a dialog box containing the contents of the shopping cart.
Here is the code below ...
I think I did a little last week because I probably miss something really easy and just plain stupid.
Any help would be greatly appreciated.
Copy code
<script type="text/javascript">
$(function() {
$( 'div.dialog' ).dialog( {modal:true,autoOpen:false} );
$('CartLink').on( 'click', function() {
var index = $(this).index() + 1;
$( '#dialog' + index ).dialog( 'open' );
});
});
</script>
<div class="dialog" id="dialog1">Shopping Cart Contents</div>
<div id="CartLink" class="fluid ShoppingCart"><img src="images/Site/Shopping_cart.gif"
alt="" width="25" height="23"/>Shopping Cart</div>
source
share