jquery-1.8

jQuery live() works with jQuery 1.8.3 & below but not with 1.9.1 or 2.0

笑着哭i 提交于 2019-12-25 11:52:46
问题 I've been using http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js for a while now and everything has been fine, but 1.8.3 got quite old so I've decided to move to the latest jQuery. And suddenly a few things stopped working: Quicksand plugin and part of my own jQuery code (that shows additional data under every slide of a slider). Can you help me figuring out what's wrong? Or maybe it's not worth moving to jQuery versions above 1.8.3? Check the Jsfiddle. HTML: <a href="#" class=

I keep getting the error “Object #<Object> has no method 'on'” in jQuery 1.8 when trying to trigger click events on dynamically loaded elements

帅比萌擦擦* 提交于 2019-12-11 11:35:00
问题 I am using jQuery 1.8 and have been getting this error on some pages when I use the .on() function. Other pages, seemingly doing the exact same thing -- attaching triggers to dynamically created elements, that I use do not generate this error: Uncaught TypeError: Object #<Object> has no method 'on' JS: $(document).ready(function(){ $(document).on("click","button.pagebutton",function() { $("div#pagesforreview").hide(); jsD=Date(); jsP=$(this).html(); $("div#externpage").load("prexternpage.php"

Making a variable in jquery 1.9.1 fails and in 1.8.3 doesn't

雨燕双飞 提交于 2019-12-11 04:06:38
问题 I just upgraded to 1.9.1 After some technical defiificulties all work except: var $newthumbs = $(' <div id=\"car-7\" class=\"thumbnail_car thumbnail span2\" data-sorting-top=\"2\" data-sorting-date=\"2013-01-12 16:47:31 UTC\"></div>'); If I put this line in the console of jquery 1.8.3 it gets accepted and I can retrieve it with $newthumbs in 1.9.1 it fails with Error: Syntax error, unrecognized expression: I've read the changelog and I don't see anything relating that should break this. I may

JQuery not working in IE 9.0.8, but works with dev tools open

有些话、适合烂在心里 提交于 2019-12-10 14:36:22
问题 The following works in all browsers except IE 9.0.8. It loads a survey form within div with an ajax request. $('.tab-content').on('click', '.show_survey_form', function(e) { e.preventDefault() target = $(this).attr("data-target") my_href = $(this).attr("href") console.log("load: " + target + " target: " + my_href) // load: #survey_response_form_33 target: /surveys/33/survey_responses/edit_multiple // Don't make a request unless the form is opening. if ($(this).hasClass('collapsed')) { console

How to replace “live” from jQuery 1.8.3 to jQuery 1.9? [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-12-09 16:23:55
问题 This question already has answers here : Turning live() into on() in jQuery (5 answers) Closed 6 years ago . My web framework automatically updated my jQuery script to the current last version, the 1.9. Now all my: $(".myclass").live("click", function() {... don't work anymore. I mostly used it with some ajax called which filled html in my page. I would know how to replace this functionnality in the last version. A friend told me to use "on" instead, but the "on" stays fixed on the same

jQuery 1.8 outer Height/Width not working

时光怂恿深爱的人放手 提交于 2019-12-09 05:02:32
问题 I have used outerHeight and outerWidth on many places. Now, after jQuery 1.8 was released I have met a lot of issues caused by object return instead of its size. For example: $('#stackoverflowdiv').Height() // returns 100 px $('#stackoverflowdiv').outerHeight() // returns "stackoverflowdiv" div The only thing that I have found to fix this was to use "true/false" in the function as follows but the I get the same results as the standard width() and height() functions: $('#stackoverflowdiv')

jQuery 1.8 outer Height/Width not working

爷,独闯天下 提交于 2019-12-03 04:23:10
I have used outerHeight and outerWidth on many places. Now, after jQuery 1.8 was released I have met a lot of issues caused by object return instead of its size. For example: $('#stackoverflowdiv').Height() // returns 100 px $('#stackoverflowdiv').outerHeight() // returns "stackoverflowdiv" div The only thing that I have found to fix this was to use "true/false" in the function as follows but the I get the same results as the standard width() and height() functions: $('#stackoverflowdiv').outerHeight(true) // returns 100 px $('#stackoverflowdiv').outerHeight(false) // returns 100 px Has anyone

Why does Firefox return 0 as the value of $(window).height()

安稳与你 提交于 2019-11-30 18:41:33
It seems to me that Firefox ought to be better equipped to return the proper value when using $(window).height() . I am using jQuery 1.8.2. Is this a bug in that particular build? Every other browser I have tested returns an appropriate value when calculating viewport height. To work around this, I've used snip below to apply a pixel value to a div. $(window).bind('cwsObjectsShown', function() { var height = $(window).height(); if (height === 0) { height = window.innerHeight; } height = height - '120'; $('#game_objects').css('height', height + 'px'); }); jQuery's $(window).height() is

Why does Firefox return 0 as the value of $(window).height()

核能气质少年 提交于 2019-11-30 02:37:37
问题 It seems to me that Firefox ought to be better equipped to return the proper value when using $(window).height() . I am using jQuery 1.8.2. Is this a bug in that particular build? Every other browser I have tested returns an appropriate value when calculating viewport height. To work around this, I've used snip below to apply a pixel value to a div. $(window).bind('cwsObjectsShown', function() { var height = $(window).height(); if (height === 0) { height = window.innerHeight; } height =

jQuery .toggle event deprecated, What to use?

女生的网名这么多〃 提交于 2019-11-28 13:39:50
Since the jQuery .toggle event method is deprecated. What are we suppose to use to simulate this event (alternate clicks)? Add this outside of document.ready $.fn.clicktoggle = function(a, b) { return this.each(function() { var clicked = false; $(this).click(function() { if (clicked) { clicked = false; return b.apply(this, arguments); } clicked = true; return a.apply(this, arguments); }); }); }; then use the following to replicate the .toggle functionality: $("#mydiv").clicktoggle(functionA,functionB); Found on the JQuery Forums Pomme Zede var i = 0; $('button').click(function() { if (i == 0){