Click here to Skip to main content
15,914,165 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am having one product code abc. when i hover the abc image, that product be counted as 1, when i again hover the product image, then count be increased to 2. when i again hover the product image then count be increased to 3. similarly everything, It should be done in JQUERY C SHARP.Requesting ur help

Regards
Dhana
Posted

1 solution

Hello,

Please have a look at following code snippet done using JQuey. A working sample can be found here[^].
HTML
<!DOCTYPE html PUBLIC "">
<html>
<head>
<script src="//code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var cntr = 0;
$(document).ready(function() {
    $('#cpLogo').on("mouseenter", function() {
       cntr++;
       $('#lblCounter').text(cntr);
    });
});
//]]>
</script>
</head>
<body>
<img src="http://s.codeproject.com/App_Themes/CodeProject/Img/logo250x135.gif" id="cpLogo"/><br/>
<label id="lblCounter">Counter</label>
</body>
</html>

Regards
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900