I am very new to backbone and I am trying to get my head around it, but can not figure out what I am doing wrong. I am not using backbones router, I do not need to, I am using PHP Slim to handle all the routes, I am not sure if that is right or not? But what I
Tag: backbone-events
Backbone.js – Both click and double click event getting fired on an element
In my Backbone View, I have defined events like this: I have bound single and double click event listeners to same element .elm. When I double click on this element, I get this output: single clicked single clicked double clicked Tried preventDefault() and stopImmediatePropagation() and that didn’t solve the issue. So, how can I prevent the single click event getting
JQueryUI resizestop event not bubbling with helper
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
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
Backbone js: register view events on parent element
I’d like to register view events on the view parent element. I tried the parent selector: But it is not working. How can I achieve this? Answer Backbone uses jQuery event delegate, so you can’t delegate events to the parent node. see in Backbone source code line 954, the View.delegateEvents function.
Backbone View events not firing
I am using Rails3 as my backend and Jammit to asset… Now I am trying to not compress and even package the assets. The simple event don’t get run, but the alert(‘asd’) int initialize is working as expected. I have already tried other kinds of events in other objects too, but it didn’t work. My code as follow: and my