Jquery On Image悬停时的增量 [英] Incrementation in Jquery On Image hover

查看:49
本文介绍了Jquery On Image悬停时的增量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个产品代码abc。当我悬停abc图像时,该产品计为1,当我再次悬停产品图像时,计数增加到2.当我再次悬停产品图像然后计数增加到3.同样一切,应该做在JQUERY C SHARP。请求你的帮助



问候

Dhana

解决方案

您好,



请查看以下使用JQuey完成的代码段。可以在这里找到工作样本[ ^ ]。

 <  ! DOCTYPE     html     PUBLIC     >  
< html >
< head >
< script src = // code.jque ry.com/jquery-1.9.1.js\" type = text / javascript > < / script >
< script 类型 = text / javascript >
// <![CDATA [
var cntr = 0 ;


document )。ready( function (){

' #cpLogo')。on( mouseenter function (){
cntr ++;


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

解决方案

Hello,

Please have a look at following code snippet done using JQuey. A working sample can be found here[^].

<!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++;


这篇关于Jquery On Image悬停时的增量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆