将方法绑定到jquery中的特定类或elemnt [英] binde a method to the specific class or elemnt in jquery

查看:57
本文介绍了将方法绑定到jquery中的特定类或elemnt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨,,



我的html中有相同类的元素,我想执行我的方法(jquery方法)当光标放在特定的元素,,

i不想使用id(html id属性)来解决这个问题!我只想使用Class(html类属性)...

hi ,,

I have elements in my html with same class , i want to execute my method(jquery method) When the cursor is placed on the specific element ,,
i dont want to use id (html id attribute) for sollving this problem !!! i just want to use Class (html class attribute)...

推荐答案

<script type="text/javascript">


function (){


' 。YourClassName').mouseover( function (){
('.YourClassName').mouseover(function () {


这篇关于将方法绑定到jquery中的特定类或elemnt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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