[jQuery] After the fact tooltip application problem
I have a page where I'm using tooltip that is dynamically constructed with $AJAX calls. The static content gets tooltip initialization just fine, but I'm having trouble with content added after initial load. The first call to tooltip after page load: function setFactoryTooltip() { $('.factory,').tooltip({ track: true, delay: 0, showURL: false, opacity: 1, showBody: - , extraClass: pretty fancy, fixPNG: true, top: -15, left: 5 }); } This works great. After an AJAX call that populates another area on the screen, I call: function setSingleTooltip(element) { $(element).tooltip({ track: true, delay: 0, showURL: false, opacity: 1, showBody: - , extraClass: list, fixPNG: true, top: -15, left: 5 }); } where 'element' is the class of a newly added div. I haven't been able to figure out where I can put the SingleTooltip call such that it is done automatically after the new divs are added. Nothing I've tried works. However, if I put that function call on a button or menu and physically call it manually, it works. Throughout all this, the original tooltips work great! Any ideas? Thanks, T.
[jQuery] Re: Ajax/Drag and Drop question
Hi, What I had to do to get that to work(doing exactly what you are doing), was once the new content was loaded from the AJAX call, destroy and re-drag the loaded divs... Something like this $ajax... success: ..somestuff... ..load new content... $('.classname').draggable('destroy'); $('.classname').draggable({helper: 'clone',handle: 'div',appendTo: 'body',zindex:1000,cursorAt: {top: 7, left: 25} }); Try something like this..I know I spent a day figuring out what needed to be done.. T. On Feb 5, 1:17 pm, DReed danreed...@gmail.com wrote: Hi There. I am new to jQuery and I have a question. I was able to get the drag/drop functionality working, very slick. For an example, I have some HTML in one div which has a droppable point, and HTML in another div which has many draggable points. I can drag and drop and all is well. The next step is to source the HTML for each div from an AJAX call, which I have done. The problem is, after it loads, the DRAG/DROP doesn't work. The draggable elements are no longer draggable. my code is pretty simple: $(#leftside).load(draggable.html); $(#pane2).load(droppable.html); Could it be that I have to do this load with a callback and then assign which classes are draggable in the callabck for the draggable content, and then do the same for the droppable? Sorry, I would have posted the source but it is in pieces right now will I am trying different things. Thanks in advance.
[jQuery] insert div into group ordered by ID..
I'm a relative newbie with jQuery and have read the doc about DOM manipulation but am too dense to answer this question: I have a series of DIVs in order by ID. I would like to insert a new DIV into its proper place in the order... Given the following: div div id=alpha/div div id=beta/div div id=gamma/div div id=epsilon/div /div How would I be able to insert the following div in its correct spot (between gamma and epsilon)? div id=alpha/div Thanks in advance!
[jQuery] Re: insert div into group ordered by ID..
Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.
[jQuery] Re: insert div into group ordered by ID..
My expectation was an explanation, but many thanks for going the extra mile, Ricardo On Dec 22, 11:04 am, Ricardo Tomasi ricardob...@gmail.com wrote: I wrote a simple plug-in that will insert elements in alphabetical order (by id) for you:http://ff6600.org/j/jquery.insertInOrder.js Use it like: div id=group div id=alpha/div div id=beta/div div id=gamma/div div id=epsilon/div /div $('div id=delta/').insertInOrder('#group'); feel free to change the naming and alter the code :] cheers, - ricardo On Dec 22, 3:32 pm, Tbone 95dak...@gmail.com wrote: Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.
[jQuery] Re: insert div into group ordered by ID..
Thanks to you, too, ksunBetween you and Ricardo, I think I understand this now! On Dec 22, 11:42 am, ksun kavi.sunda...@gmail.com wrote: //locate the div before which you want to insert and then insert, assuming they are ordered alphabetically $('div[id]').each(function(){ if ($(this).attr('id') 'delta') $(this).before('div id=delta/'); }); I think there is no selector that will do the same, but I may be wrong. On Dec 22, 12:32 pm, Tbone 95dak...@gmail.com wrote: Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.- Hide quoted text - - Show quoted text -
[jQuery] Re: IE problems with jQuery
The extra comma was indeed the problem!! Thanks much Mike!! On Nov 18, 5:01 am, Mike Alsup [EMAIL PROTECTED] wrote: [ 1, 2, 3, ] // IE chokes on the last comma Mike