如果在标签中使用runat = server,则无法使用jQuery [英] Jquery not work if runat = server is used in tag

查看:86
本文介绍了如果在标签中使用runat = server,则无法使用jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery不适用于图像缩放器
http://www.dynamicdrive.com/dynamicindex4/featuredimagezoomer.js

Jquery is not working for image zoomer
http://www.dynamicdrive.com/dynamicindex4/featuredimagezoomer.js

jQuery(document).ready(function ($) {

        $('#Imglead1').addimagezoom({
            zoomrange: [3, 10],
            magnifiersize: [300, 300],
            magnifierpos: 'right',
            cursorshade: true,
            largeimage: 'http://i44.tinypic.com/11icnk5.jpg' //<-- No comma after last option!
        })

推荐答案

){


(' #Imglead1').addimagezoom({ zoomrange:[ 3 10 ], 放大镜大小:[ 300 300 ], magnifierpos:' 正确', cursorshade: true , largeimage:' http://i44.tinypic.com/11icnk5.jpg' <-最后一个选项后没有逗号! })
('#Imglead1').addimagezoom({ zoomrange: [3, 10], magnifiersize: [300, 300], magnifierpos: 'right', cursorshade: true, largeimage: 'http://i44.tinypic.com/11icnk5.jpg' //<-- No comma after last option! })


这是有效的行为.将runat = server应用于控件/标签的运行时ID会发生变化.

通过检查页面的"查看源代码"或" FireBug ",检查生成的运行时ID.
That is a valid behavior. Run-Time Id of a control/tag gets change when you apply runat = server to it.

Check what is the Run-Time Id generated by checking "View Source" of the page or by "FireBug".


这篇关于如果在标签中使用runat = server,则无法使用jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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