Hi Chris,
You're probably binding the jtip function to the page only when it's
initially loaded. You'll probably need to re-bind it after the new
content has been inserted into the DOM.
Here is a link to to a quick solution:
http://docs.jquery.com/
Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_r
equest.3F
and here is a link to a lengthier discussion:
http://docs.jquery.com/Tutorials:AJAX_and_Events
One caveat: If I recall correctly, the Behaviors plugin doesn't work
with content that is inserted via ajax (only via DOM manipulation).
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Aug 1, 2007, at 10:30 PM, Chris Hall wrote:
Hello all.
I am new to jQuery, and I must say it is FANTASTIC!!!!!
I am using jTips and it is working very well, but with one exception.
When my page is intially loaded, everything works great. However,
when I reload a DIV using AJAX, the jtips in that div do not work.
I have verified the code I am using to reload the div is exactly the
same (for testing, but once this is fixed it will not be).
So for example, when the page is initially loaded I have:
Area description goes here<br /> In this area you see <a
href="tips.php?tip=player14" class="jTip" id="player14"
name="GON">test13</a>, <a href="tips.php?tip=player19" class="jTip"
id="player19" name="GON">test5</a>
And everything works fine.
But after the page has been loaded and I use AJAX to reload that div
with:
Area description goes here<br /> In this area you see <a
href="tips.php?tip=player14" class="jTip" id="player14"
name="GON">test13</a>, <a href="tips.php?tip=player19" class="jTip"
id="player19" name="GON">test5</a>
The jtips do not work.
What am I doing wrong?
And thanks for all your help and your wonderful framework!!!