I am using Backbone View events to listen for JQueryUI’s resizestop. This worked with JQuery 1.6.4, but not with 1.7.1. It seems to only be an issue with the resize helper on. This is a super-specific bug, so the question is how does one debug such things? edit Simplified test, without Backbone: http://jsfiddle.net/forresto/yXvmv/ Answer That’s weird that it’s only happening
Tag: jquery
Catch scrolling event on overflow:hidden element
Any insights on how to catch a scrolling event on a element that has overflow:hidden? I would like to scroll in a column without showing a scrollbar to the user. Answer This is actually a somewhat indepth process. What I do is set global flags when users mouse enters and leaves the element that you want to scroll. Then, on
How to move an iFrame in the DOM without losing its state?
Take a look at this simple HTML:
Let’…
Backbone and jQuery events
I have a simple task – retrieve click listener function from DOM element. I’ve fased two problems: I have no idea how to obtain event listener, that was set via addEventListener function $(element).data(‘events’) is always empty Talking about first problem – I think it’s not critical as I’m using this function only in one place. But the second problem is
Registering keyup on Ctrl when used to change tabs in JQuery
I have create a wysiwyg HTML editor. When the user holds down keys down Ctrl, it sets a variable ctrlPressed to true. When the key up event is fired with the Ctrl keycode, then ctrlPressed is set to false. However, when the user presses Ctrl+PgUp to change tabs, there is no way for ctrlPressed to be set to false again
JavaScript test if a CSS stylesheet is applied with CSS3 media query
I have two style sheets: The second one should only be loaded when the window is 800px or wider (narrower displays get a layout more appropriate for mobile devices). The JavaScript needs to know if that second style sheet is being applied, I have tried the jQuery: But when you get around the 790 – 810px width, Chrome/Firefox (and probably
Fadeout all nested divs
On my page I’m trying to do smth like that: Lets say, when we click on some link with id min_reg it animates div with idftr_form_cntr, and shows another div tcr_form_cntr within. There are 3-4 links that does same function but shows another div within ftr_form_cntr. Well if user clicked one of this links for the first time then there
Redirect User On Enter Key Based on Text Field Value
I’m trying to simulate some software and I need the user to be able to enter some text into a field and then direct them to another page based on that text. I’ve created the code below but it doesn’t seem to work. I’m using IE 7 and it just seems to refresh the page, it won’t actually go to
JavaScript Regex to match a URL in a field of text
How can I setup my regex to test to see if a URL is contained in a block of text in javascript. I cant quite figure out the pattern to use to accomplish this EDIT: So the Pattern I have now works in regex testers for what I need it to do but chrome throws an error for the following
Preloading a youtube embed
I want to have an embedded chromeless youtube video preload its video WITHOUT playing when the page loads. Right now I’m using an awkward “play then quickly pause” script which causes small problems (half-second audio leaks and fails quite a bit). For this seemingly simple functionality, is there a better/more elegant way to preload? Answer I had the same question