jQuery 1.3 + live/livequery + draggable problem
|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
jQuery 1.3 + live/livequery + draggable problemThrough the wonders of jQuery 1.2.6, jQuery UI 1.6rc2/4 and LiveQuery, I am able to make divs that are generated after the page load be draggable via something like so:
$(".results_container").livequery(function() { $(this).draggable({ helper: 'clone', cursor: 'move', revert: 'invalid', start: function(ev, ui) { var title = $.trim( $(this).children("div.results_title").text() ); $(ui.helper).addClass("my_dragged").html(draggedObj) .data("title", title); } }); }); Now I'm trying to convert to jQuery 1.3b2 and haven't yet had any luck. My first step was to simply replace 1.2.6 with 1.3b2 and continue using LiveQuery. It feels like the events get registered, but when I drag, it seems as though the start function isn't being called (which is confirmed by setting Firebug breakpoints within the function that aren't triggered). I'd of course prefer to use the new $.live functionality, but can't figure out how. There are other events in my code that I register as: $(".foo").livequery("click", function() { ... that I can convert to $(".foo").live("click", function() { ... and they work both ways with 1.2.6 and 1.3b2. It's just that $(".foo").livequery(function() { $(this).draggable({ ... that I can't seem to get working either way (LiveQuery or $.live). Besides the helper not being generated, the drop event isn't caught either, so the whole drag & drop is broken. Anyone have any ideas? Thanks! |
|
|
Re: jQuery 1.3 + live/livequery + draggable problemI'm not sure you'll have success (yet) combining a (preview) released version of jQuery UI 1.6 with a (preview) released version of jQuery 1.3. Here's a summary
jQuery UI 1.5.3 will only work with jQuery 1.2.6 (not 1.3) jQuery UI 1.6 final will only work with jQuery 1.3 final (not 1.2.6) The problem is jQuery UI 1.6rc4 works only with 1.2.6. So we're in kind of an in-between state. From now until that release is final, we're working on switching over and testing against 1.3pre. That work is in jQuery UI trunk, but not 1.6rc4. The plan is to release 1.6rc5 the day after 1.3 final is released. It will be tested against and ship with 1.3. We'll have one week of testing, then finalize jQuery UI 1.6. If you're interested, you're more than welcome to help us test the interim scenario I've described above. It would mean checking out the jQuey UI trunk. But should be simple otherwise as that contains the version of jQuery 1.3pre we're testing against (r6065, a little later than 1.3b2 - r6056). - Richard On Wed, Jan 7, 2009 at 5:29 PM, Joshua Uziel <uzi@...> wrote: Through the wonders of jQuery 1.2.6, jQuery UI 1.6rc2/4 and LiveQuery, I am able to make divs that are generated after the page load be draggable via something like so: |
|
|
Re: jQuery 1.3 + live/livequery + draggable problemI'm currently using the SVN Trunk version of jQuery and jQuery UI and the sortables, which use drag and drop, are working for me. If you are willing to live on the edge, which I'm guessing you are since you are trying to use preview releases, you might want to try trunk to see if that fixes your issue.
-- Brandon Aaron
On Wed, Jan 7, 2009 at 9:28 PM, Richard D. Worth <rdworth@...> wrote: I'm not sure you'll have success (yet) combining a (preview) released version of jQuery UI 1.6 with a (preview) released version of jQuery 1.3. Here's a summary |
|
|
Re: jQuery 1.3 + live/livequery + draggable problemHey Richard, Brandon,
Thanks... the kind citizens of IRC and a little more forum digging pointed me to the answer (I'd have updated this thread sooner, but being new to the group meant my posts were moderated). I'm working on something that's in development and can live on the edge within the jQuery 1.3 / jQuery UI 1.6 release schedule... thus, I'm happy to take things for a spin. I just wanted to confirm that what you both said is true. Using jQuery 1.3b2 and jQuery UI from trunk, I was able to get things working with LiveQuery. I was also able to get $.live working for that specific case via a hack suggested by illuminum on irc: $(".results_container").live("mouseover", function() { if (!$(this).data("init")) { $(this).data("init", true); $(this).draggable({ ... Perhaps someone else searching the archives will find that useful. Thanks again! On Wed, Jan 7, 2009 at 7:28 PM, Richard D. Worth <rdworth@...> wrote: I'm not sure you'll have success (yet) combining a (preview) released version of jQuery UI 1.6 with a (preview) released version of jQuery 1.3. Here's a summary --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery (English)" group. To post to this group, send email to jquery-en@... To unsubscribe from this group, send email to jquery-en+unsubscribe@... For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |