The anchor link was not showing up until after the load(), so the toggle() function couldn't find it. But lo and behold, the load function has a callback function!! So I could bind the toggle AFTER the html came in
Ba Bam! jQuery is the best!
code snippet:
$("body").prepend("<div id='IntuitHeader'></div>");
$("#IntuitHeader").load("IntuitProducts.htm",
{test: true},
function()
{
$("a.IntuitHeaderbar").toggle(
function(){
$("#Quicklinks").slideDown("slow").blur();
$("img.handle").src("images/barHandleup.gif");
},
function(){
$("#Quicklinks").slideUp("slow").blur();
$("img.handle ").src("images/barHandledown.gif");
});
return false;
}
);
On 10/6/06, Glen Lipka <
[EMAIL PROTECTED]> wrote:
prepend() puts it right after the body.
append() puts it at the end before the </body>
Glen.On 10/6/06, Olivier Percebois-Garve < [EMAIL PROTECTED]> wrote:why not try append() instead of prepend() ?
in
$("body").prepend("<div id='intuitHeader'></div>");
olivvv
Glen Lipka wrote:Sample URL:
http://glenlipka.kokopop.com/jQuery/slideMenu.htm#
I am trying to make the header totally loaded through jQuery.
So my steps are:
1. Insert DIV right after body
2. $Load html for DIV and anchor link
3. set toggle function on anchor link
Almost everything seems to work, but the toggle is not getting bound right.
Am I breaking the rules here? Sorry for the rapid fire help requests. :)
Thanks.
Glen
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/