[FX.php List] JavaScript, AJAX, jQuery assistance?

Nick whatdoyouwant at gmail.com
Tue Sep 25 16:57:00 MDT 2007


well I can tell you that it doesn't work because you haven't attached an
event to that link.

the way jTip seems to work is that when the page initially loads, it calls
JT_init();
which attaches events to all current a links that have class of jTip
the div you load later never gets touched by JT_init().

try running JT_init(); in a script block at the end of your ajaxpage.html,
or onsuccess of loading.  though this isn't the ideal solution, you will see
that it works.

you can also run JT_init(); in the firebug console after loading the div,
and then hover and see that it works.

On 9/25/07, Joel Shapiro <jsfmp at earthlink.net> wrote:
>
> Hmm is right!
>
> Another weird thing: I used Firefox's Web Developer to View Generated
> Source after loading the AJAX div.  I copied the generated source and
> pasted it into a new page, and the tooltip *does* work in the
> (yellow) div -- until I refresh the div with the AJAX call, and then
> it behaves as originally -- not working.
>
> <sigh>
>
> -Joel
>
>
> On Sep 25, 2007, at 11:26 AM, Dale Bengston wrote:
>
> > Hey Joel,
> >
> > No, I didn't mean to imply uppers were better than lowers. I had to
> > write them in some order or other!
> >
> > Looking at your page with FireBug and FireFox, the part that gets
> > AJAX-d in doesn't even fire off an event when you roll over it. It
> > doesn't generate any errors either. Hmm.
> >
> > Dale
> >
> > On Sep 25, 2007, at 1:21 PM, Joel Shapiro wrote:
> >
> >> Thanks Dale & Nick for the suggestions -- and the advice to always
> >> start element names with letters.  (Dale, were you implying that
> >> starting them with CAPS are preferable to lower case "Try starting
> >> them with A-Z, a-z"?)
> >>
> >> I haven't found a fix yet...  I'll keep trying.
> >>
> >> Any other suggestions?
> >>
> >> Thanks,
> >> -Joel
> >>
> >>
> >> On Sep 24, 2007, at 9:34 PM, Nick wrote:
> >>
> >>> I noticed you're using a few different doctypes.  along with id's
> >>> starting with letters and not numbers as said above, checking
> >>> which doctypes your javascript supports is a good idea.
> >>
> >>
> >> On Sep 24, 2007, at 7:34 PM, Dale Bengston wrote:
> >>
> >>> Hi Joel,
> >>>
> >>> What happens if you use double quotes around the id of the ajax-d
> >>> div instead of single quotes? Also, JavaScript doesn't like
> >>> element names and other attributes that start with numbers (form
> >>> names, classes, ids, etc.) Try starting them with A-Z, a-z.
> >>>
> >>> Hope this gets you started,
> >>>
> >>> Dale
> >>>
> >>> On Sep 24, 2007, at 7:50 PM, Joel Shapiro wrote:
> >>>
> >>>> Hi all
> >>>>
> >>>> I've got a JavaScript tooltip (jTip with jQuery) working to pull
> >>>> record details (not initially loaded on the page) into a
> >>>> tooltip.  This works fine.
> >>>>
> >>>> I've also got links that load new data into existing divs on my
> >>>> starting page.  This also works fine.
> >>>>
> >>>> However...
> >>>> I would like the reloaded divs to still have 'hover-able'
> >>>> tooltips... but this is not working fine.  It's not working at
> >>>> all :-(
> >>>>
> >>>> It _seems_ that the reloaded divs can't refer back to the
> >>>> tooltip JavaScript that was loaded when the start page first
> >>>> loaded.  Yet when I try a different js tooltip, I *can* get the
> >>>> tooltips to work inside the new AJAX divs.
> >>>>
> >>>> I've put a demo here:
> >>>> http://jsfmp.com/tooltip/notworking.html
> >>>>
> >>>> (This is not connected to a DB, although I'm using LAJAX to call
> >>>> the ajaxpage into the div because it was available and easy ;)
> >>>>
> >>>>  - So my question is:  Why is the jQuery/jTip tooltip not
> >>>> working while another js tooltip is?  And is there anything I
> >>>> can do so that the jTip functionality will work inside the
> >>>> reloaded AJAX divs?  (The tooltip that *does* work doesn't have
> >>>> features I'd like to use, such as re-positioning so tooltips
> >>>> don't go outside the browser window...)
> >>>>
> >>>> Thanks for any/all suggestions.
> >>>>
> >>>> -Joel
> >>>> _______________________________________________
> >>>> FX.php_List mailing list
> >>>> FX.php_List at mail.iviking.org
> >>>> http://www.iviking.org/mailman/listinfo/fx.php_list
> >>>
> >>> _______________________________________________
> >>> FX.php_List mailing list
> >>> FX.php_List at mail.iviking.org
> >>> http://www.iviking.org/mailman/listinfo/fx.php_list
> >>
> >> _______________________________________________
> >> FX.php_List mailing list
> >> FX.php_List at mail.iviking.org
> >> http://www.iviking.org/mailman/listinfo/fx.php_list
> >
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070925/d7beddd4/attachment-0001.html


More information about the FX.php_List mailing list