timeglider / jquery_widget

Timeglider's JS Widget component. See README for details.
193 stars 41 forks source link

Click events don't work with jQuery 1.8 #58

Open thsur opened 11 years ago

thsur commented 11 years ago

Scenario: Running the "History of Idaho" demo with jQuery 1.8.2 & jQueryUI 1.8.23

What: Descriptions don't show up when clicking on a timeline item.

Issue: tg.TG_TimelinePlayer.eventModal isn't called because event isn't bound at TG_TimelineView:558

Possible solution: Change .delegate(CONTAINER + " .timeglider-timeline-event", CLICKORTOUCH, function () { to .delegate(".timeglider-timeline-event", CLICKORTOUCH, function () { or .on(CLICKORTOUCH, ".timeglider-timeline-event", function () {

timeglider commented 11 years ago

The real reason for this was that we added Modernizr as a dependency, but forgot to update the host HTML files. The CLICKORTOUCH string would be "click" in normal (PC) browsers, and "touchstart" on touch enabled devices — so this string wasn't being properly defined. So, just make sure now to add modernizr.js (or a custom version of it) into the element. I'm actually going to remove this as a true dependency, and have this default to "click" or be called from the widget options, optionally.

FYI, all Timeglider widget code has been moved off of Github, and is now living on our site at timeglider.com/widget (Past commits are still here on github)

You can email me directly at michael@timeglider.com with questions or ideas.

On Tue, Oct 23, 2012 at 6:05 PM, thsur notifications@github.com wrote:

Scenario: Running the "History of Idaho" demo with jQuery 1.8.2 & jQueryUI 1.8.23

What: Descriptions don't show up when clicking on a timeline item.

Issue: tg.TG_TimelinePlayer.eventModal isn't called because event isn't bound at TG_TimelineView:558

Possible solution: Change .delegate(CONTAINER + " .timeglider-timeline-event", CLICKORTOUCH, function () { to .delegate(".timeglider-timeline-event", CLICKORTOUCH, function () { or .on(CLICKORTOUCH, ".timeglider-timeline-event", function () {

— Reply to this email directly or view it on GitHubhttps://github.com/timeglider/jquery_widget/issues/58.


founder / lead developer Timeglider http://timeglider.com michael@timeglider.com twitter @timeglider 208.850.8512