jquery-1.6

Disabling an element in jquery 1.6

懵懂的女人 提交于 2020-02-01 18:27:53
问题 With the release of jQuery 1.6, the recommendation on SO has been to generally start using prop() where you used to use attr() . What happens when I want to disable an element? $('.control').prop('disabled', 'disabled'); $('.control').prop('disabled', true); Neither of these seem to disable the control. Is disabling an element the exception to the rule? UPDATE And turns out the reason the element wasn't being disabled was because of a line I had that ran before the lines above: $('.control')

jQuery 1.9 backward compatibility issue?

拥有回忆 提交于 2019-12-22 18:29:43
问题 I am trying to use a jQuery plugin on my site which uses jQuery 1.6.2. When I change the jQuery version to 1.9 the plugin no longer works. I thought there was a backwards compatibility feature in jQuery. Is there any way to know/fix the code that does not work in 1.9? If it helps I am trying to use a plugin called CropZoom and here is the link. Also, let me know if there is similar plugin the same features. I'll appreciate it. Thanks 回答1: This is How jQuery tell's you to fix it: We realize

jQuery 1.9 backward compatibility issue?

前提是你 提交于 2019-12-22 18:29:01
问题 I am trying to use a jQuery plugin on my site which uses jQuery 1.6.2. When I change the jQuery version to 1.9 the plugin no longer works. I thought there was a backwards compatibility feature in jQuery. Is there any way to know/fix the code that does not work in 1.9? If it helps I am trying to use a plugin called CropZoom and here is the link. Also, let me know if there is similar plugin the same features. I'll appreciate it. Thanks 回答1: This is How jQuery tell's you to fix it: We realize

jquery 1.4.2 working for iCheckBox and not jquery 1.6

旧街凉风 提交于 2019-12-20 06:13:49
问题 I am using this jquery plugin for Apple like checkbox button. However when I use jquery version 1.4.2 it works perfectly but when I try to use jquery version 1.6. that plugin doesn't work. I tried debugging javascript using IE9 developer toolbar but it is not throwing any error. Thank you. 回答1: EDIT: got it working in FF4 as well now, see this: jQuery 1.6: backgroundPosition vs backgroundPositionX and FF4 compatibility Got it working with jQuery 1.6.x and 1.5.x (in Safari and Chrome on Mac,

jquery 1.4.2 working for iCheckBox and not jquery 1.6

落爺英雄遲暮 提交于 2019-12-20 06:13:06
问题 I am using this jquery plugin for Apple like checkbox button. However when I use jquery version 1.4.2 it works perfectly but when I try to use jquery version 1.6. that plugin doesn't work. I tried debugging javascript using IE9 developer toolbar but it is not throwing any error. Thank you. 回答1: EDIT: got it working in FF4 as well now, see this: jQuery 1.6: backgroundPosition vs backgroundPositionX and FF4 compatibility Got it working with jQuery 1.6.x and 1.5.x (in Safari and Chrome on Mac,

Setting a control to readonly using jquery 1.6 .prop()

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 05:27:33
问题 With the release of jQuery 1.6, the recommendation on SO has been to generally start using prop() where you used to use attr(). What happens when I want make an element readonly? $('.control').prop('readonly', 'readonly'); $('.control').prop('readonly', true); Neither of these seem to make the control readonly. Is making an element readonly the exception to the rule? 回答1: The problem is that the property name is case-sensitive. Try: $('.control').prop('readOnly', true); Though really I don't

Possible bug in jQuery 1.6 - $(…).attr(“checked”) is not working

被刻印的时光 ゝ 提交于 2019-12-10 17:48:19
问题 I have two radio buttons on my form and up until I started using jQuery 1.6 the following code worked fine: <input type="radio" id="radio1" name="test"/> <input type="radio" id="radio2" name="test"/> <input type="button" onclick="testcheck()" value="Test"/> <script> function testcheck() { if (jQuery("#radio1").attr("checked")) alert("first button checked"); else if (jQuery("#radio2").attr("checked")) alert("second button checked"); else alert("none checked") } </script> Once I start using

jQuery 1.9 backward compatibility issue?

痴心易碎 提交于 2019-12-06 13:35:51
I am trying to use a jQuery plugin on my site which uses jQuery 1.6.2. When I change the jQuery version to 1.9 the plugin no longer works. I thought there was a backwards compatibility feature in jQuery. Is there any way to know/fix the code that does not work in 1.9? If it helps I am trying to use a plugin called CropZoom and here is the link. Also, let me know if there is similar plugin the same features. I'll appreciate it. Thanks This is How jQuery tell's you to fix it: We realize that existing sites and plugins may be affected by these changes, and are providing the jQuery Migrate plugin

Disabling an element in jquery 1.6

家住魔仙堡 提交于 2019-12-05 01:24:23
With the release of jQuery 1.6, the recommendation on SO has been to generally start using prop() where you used to use attr() . What happens when I want to disable an element? $('.control').prop('disabled', 'disabled'); $('.control').prop('disabled', true); Neither of these seem to disable the control. Is disabling an element the exception to the rule? UPDATE And turns out the reason the element wasn't being disabled was because of a line I had that ran before the lines above: $('.control').removeProp('disabled'); In enabling controls, I had got used to using .removeAttr() so figured

jquery 1.4.2 working for iCheckBox and not jquery 1.6

走远了吗. 提交于 2019-12-02 10:01:38
I am using this jquery plugin for Apple like checkbox button. However when I use jquery version 1.4.2 it works perfectly but when I try to use jquery version 1.6. that plugin doesn't work. I tried debugging javascript using IE9 developer toolbar but it is not throwing any error. Thank you. mikkelbreum EDIT: got it working in FF4 as well now, see this: jQuery 1.6: backgroundPosition vs backgroundPositionX and FF4 compatibility Got it working with jQuery 1.6.x and 1.5.x (in Safari and Chrome on Mac, not working in FF4/Mac) There were two problems with the original code, one making it