[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-21 Thread cajchris

The code that does the replace is within a javascript file and is
follows:

top.document.getElementById("topTabs").innerHTML = data;

"topTabs" is a div element and data is the new  structure with the
added 

Even if I somehow managed to just locate the correct parent  and
add in the new  I would still have the same problem in that it
would not have any auto generated JQuery code and therefore would not
appear when hovering over the parent item.

On Jan 20, 4:24 pm, "Rick Faircloth"  wrote:
> Can you post your code that's doing the replacement
> for your menu?  I assume that some of the jQuery code
> in the original menu is generated by Superfish?  If so,
> replacing that "auto-generated" code could be tricky...
>
>
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > Behalf Of cajchris
> > Sent: Tuesday, January 20, 2009 10:26 AM
> > To: jQuery (English)
> > Subject: [jQuery] Re: Refreshing Menu after Adding New Structure
>
> > Rick,
>
> > Its not really a problem to do with clicking events etc its more to do
> > with the general information that JQuery adds to elements being lost.
>
> > Here is an example of the UL code I have after the innerHTML replace
> > is done (the Amex is the newly added
> > structure):
>
> >                   FAQ
> >                   
> >                     
> >                      > href="http://localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">All Groups
> >                     
> >                       
> >                       Amex
> >                       
> >                     
> >                     
> >                     
> >                      > href="http://localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">Top 10
> >                     
> >                     
> >                      > href="http://localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">AECustView
> >                     
> >                   
>
> > Before the innerHTML it was:
>
> >                    > href="#" jQuery1232463464064="85">FAQ > jQuery1232463464064="null">»
> >                    > oldblock="block">
> >                     
> >                      > href="#" jQuery1232463464064="87">All Groups
> >                     
> >                     
> >                      > jQuery1232463464064="89">Top 10
> >                     
> >                     
> >                      > jQuery1232463464064="91">AECustView
> >                     
> >                   
>
> > So you can see that all the JQuery information has been lost. Is there
> > anyway to get all of that back? As now the hover functionality on this
> > menu does not work. It is based on the superfish menu system
>
> > On Jan 20, 3:20 pm, "Rick Faircloth"  wrote:
> > > Here's a good link for you:
>
> > >http://brandonaaron.net/blog/2007/08/19/new-plugin-live-query
>
> > > And here's a sample (that's right off the page above)
>
> > > $('a')
> > >     .livequery('click', function(event) {
> > >         alert('clicked');
> > >         return false;
> > >     });
>
> > > There are also other examples and some demos on the page above, too.
>
> > > Live query couldn't be easier.  Just include the reference for the
> > > plug-in in your header under the main jQuery core reference, then
> > > find your code that triggers the action that injects new DOM elements
> > > and put .livequery (as above) in between the element and the click 
> > > function.
>
> > > That's all I had to do to solve this problem.
>
> > > Send some of your code if you need more help.
>
> > > Rick
>
> > > > -Original Message-
> > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > > > Behalf Of cajchris
> > > > Sent: Tuesday, January 20, 2009 9:03 AM
> > > > To: jQuery (English)
> > > > Subject: [jQuery] Re: Refreshing Menu after Adding New Structure
>
> > > > Also is it fairly straightforward to use. The only thing that seems to
> > > > have been dropped are things like:
>
> > > >  replaced with

[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread Rick Faircloth

Can you post your code that's doing the replacement
for your menu?  I assume that some of the jQuery code
in the original menu is generated by Superfish?  If so,
replacing that "auto-generated" code could be tricky...




> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of cajchris
> Sent: Tuesday, January 20, 2009 10:26 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Refreshing Menu after Adding New Structure
> 
> 
> Rick,
> 
> Its not really a problem to do with clicking events etc its more to do
> with the general information that JQuery adds to elements being lost.
> 
> Here is an example of the UL code I have after the innerHTML replace
> is done (the Amex is the newly added
> structure):
> 
>   FAQ
>   
> 
>  href="http://localhost/servlet/
> com.isa.balmoral.admin.process.PFrameworkServlet#">All Groups
> 
>   
>   Amex
>   
> 
> 
> 
>  href="http://localhost/servlet/
> com.isa.balmoral.admin.process.PFrameworkServlet#">Top 10
> 
> 
>  href="http://localhost/servlet/
> com.isa.balmoral.admin.process.PFrameworkServlet#">AECustView
> 
>   
> 
> Before the innerHTML it was:
> 
>href="#" jQuery1232463464064="85">FAQ jQuery1232463464064="null">»
>oldblock="block">
> 
>  href="#" jQuery1232463464064="87">All Groups
> 
> 
>  jQuery1232463464064="89">Top 10
> 
> 
>  jQuery1232463464064="91">AECustView
> 
>   
> 
> So you can see that all the JQuery information has been lost. Is there
> anyway to get all of that back? As now the hover functionality on this
> menu does not work. It is based on the superfish menu system
> 
> On Jan 20, 3:20 pm, "Rick Faircloth"  wrote:
> > Here's a good link for you:
> >
> > http://brandonaaron.net/blog/2007/08/19/new-plugin-live-query
> >
> > And here's a sample (that's right off the page above)
> >
> > $('a')
> >     .livequery('click', function(event) {
> >         alert('clicked');
> >         return false;
> >     });
> >
> > There are also other examples and some demos on the page above, too.
> >
> > Live query couldn't be easier.  Just include the reference for the
> > plug-in in your header under the main jQuery core reference, then
> > find your code that triggers the action that injects new DOM elements
> > and put .livequery (as above) in between the element and the click function.
> >
> > That's all I had to do to solve this problem.
> >
> > Send some of your code if you need more help.
> >
> > Rick
> >
> > > -Original Message-
> > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > > Behalf Of cajchris
> > > Sent: Tuesday, January 20, 2009 9:03 AM
> > > To: jQuery (English)
> > > Subject: [jQuery] Re: Refreshing Menu after Adding New Structure
> >
> > > Also is it fairly straightforward to use. The only thing that seems to
> > > have been dropped are things like:
> >
> > >  replaced with just 
> >
> > > AND
> >
> > > 
> >
> > > replaced with 
> >
> > > This is why I need the JQuery to refresh and put these values back in
> >
> > > Cheers
> >
> > > On Jan 20, 1:57 pm, cajchris  wrote:
> > > > Hey Rick,
> >
> > > > That URL you posted is not valid, could you repost it please
> >
> > > > Thanks
> > > > Chris
> >
> > > > On Jan 20, 1:48 pm, "Rick Faircloth"  wrote:
> >
> > > > > Forgot to mention...
> >
> > > > > If you're using jQuery 1.3, there is now a built-in in .live function
> > > > > that you can use in place of LiveQuery, but it has some limitations 
> > > > > for
> > > > > now that LiveQuery doesn't.

[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread cajchris

Rick,

Its not really a problem to do with clicking events etc its more to do
with the general information that JQuery adds to elements being lost.

Here is an example of the UL code I have after the innerHTML replace
is done (the Amex is the newly added
structure):

  FAQ
  

http://localhost/servlet/
com.isa.balmoral.admin.process.PFrameworkServlet#">All Groups

  
  Amex
  



http://localhost/servlet/
com.isa.balmoral.admin.process.PFrameworkServlet#">Top 10


http://localhost/servlet/
com.isa.balmoral.admin.process.PFrameworkServlet#">AECustView

  

Before the innerHTML it was:

  FAQ»
  

All Groups


Top 10


AECustView

  

So you can see that all the JQuery information has been lost. Is there
anyway to get all of that back? As now the hover functionality on this
menu does not work. It is based on the superfish menu system

On Jan 20, 3:20 pm, "Rick Faircloth"  wrote:
> Here's a good link for you:
>
> http://brandonaaron.net/blog/2007/08/19/new-plugin-live-query
>
> And here's a sample (that's right off the page above)
>
> $('a')
>     .livequery('click', function(event) {
>         alert('clicked');
>         return false;
>     });
>
> There are also other examples and some demos on the page above, too.
>
> Live query couldn't be easier.  Just include the reference for the
> plug-in in your header under the main jQuery core reference, then
> find your code that triggers the action that injects new DOM elements
> and put .livequery (as above) in between the element and the click function.
>
> That's all I had to do to solve this problem.
>
> Send some of your code if you need more help.
>
> Rick
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > Behalf Of cajchris
> > Sent: Tuesday, January 20, 2009 9:03 AM
> > To: jQuery (English)
> > Subject: [jQuery] Re: Refreshing Menu after Adding New Structure
>
> > Also is it fairly straightforward to use. The only thing that seems to
> > have been dropped are things like:
>
> >  replaced with just 
>
> > AND
>
> > 
>
> > replaced with 
>
> > This is why I need the JQuery to refresh and put these values back in
>
> > Cheers
>
> > On Jan 20, 1:57 pm, cajchris  wrote:
> > > Hey Rick,
>
> > > That URL you posted is not valid, could you repost it please
>
> > > Thanks
> > > Chris
>
> > > On Jan 20, 1:48 pm, "Rick Faircloth"  wrote:
>
> > > > Forgot to mention...
>
> > > > If you're using jQuery 1.3, there is now a built-in in .live function
> > > > that you can use in place of LiveQuery, but it has some limitations for
> > > > now that LiveQuery doesn't.
>
> > > > > -Original Message-
> > > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
> > > > > On Behalf Of cajchris
> > > > > Sent: Tuesday, January 20, 2009 7:18 AM
> > > > > To: jQuery (English)
> > > > > Subject: [jQuery] Refreshing Menu after Adding New Structure
>
> > > > > Hi,
>
> > > > > I am wondering if there is a method to refresh or recall the JQuery
> > > > > function that will process the unordered list and its list items in my
> > > > > menu in order to add the JQuery specific information back in after
> > > > > some new elements have been dynamically added to the menu structure.
>
> > > > > As currently I have redrawn my unordered list HTML but it does not
> > > > > contain the jQuery specific information and therefore I can no longer
> > > > > hover over the links and see the sub menus.
>
> > > > > Thanks in advance
> > > > > Chris


[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread Rick Faircloth

Here's a good link for you:

http://brandonaaron.net/blog/2007/08/19/new-plugin-live-query

And here's a sample (that's right off the page above)

$('a') 
.livequery('click', function(event) { 
alert('clicked'); 
return false; 
});

There are also other examples and some demos on the page above, too.

Live query couldn't be easier.  Just include the reference for the
plug-in in your header under the main jQuery core reference, then
find your code that triggers the action that injects new DOM elements
and put .livequery (as above) in between the element and the click function.

That's all I had to do to solve this problem.

Send some of your code if you need more help.

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of cajchris
> Sent: Tuesday, January 20, 2009 9:03 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Refreshing Menu after Adding New Structure
> 
> 
> Also is it fairly straightforward to use. The only thing that seems to
> have been dropped are things like:
> 
>  replaced with just 
> 
> AND
> 
> 
> 
> replaced with 
> 
> This is why I need the JQuery to refresh and put these values back in
> 
> Cheers
> 
> On Jan 20, 1:57 pm, cajchris  wrote:
> > Hey Rick,
> >
> > That URL you posted is not valid, could you repost it please
> >
> > Thanks
> > Chris
> >
> > On Jan 20, 1:48 pm, "Rick Faircloth"  wrote:
> >
> > > Forgot to mention...
> >
> > > If you're using jQuery 1.3, there is now a built-in in .live function
> > > that you can use in place of LiveQuery, but it has some limitations for
> > > now that LiveQuery doesn't.
> >
> > > > -Original Message-
> > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > > > Behalf Of cajchris
> > > > Sent: Tuesday, January 20, 2009 7:18 AM
> > > > To: jQuery (English)
> > > > Subject: [jQuery] Refreshing Menu after Adding New Structure
> >
> > > > Hi,
> >
> > > > I am wondering if there is a method to refresh or recall the JQuery
> > > > function that will process the unordered list and its list items in my
> > > > menu in order to add the JQuery specific information back in after
> > > > some new elements have been dynamically added to the menu structure.
> >
> > > > As currently I have redrawn my unordered list HTML but it does not
> > > > contain the jQuery specific information and therefore I can no longer
> > > > hover over the links and see the sub menus.
> >
> > > > Thanks in advance
> > > > Chris



[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread cajchris

Anyone with any examples on how to use this?

Bit of a newby at this

Cheers

On Jan 20, 2:03 pm, cajchris  wrote:
> Also is it fairly straightforward to use. The only thing that seems to
> have been dropped are things like:
>
>  replaced with just 
>
> AND
>
> 
>
> replaced with 
>
> This is why I need the JQuery to refresh and put these values back in
>
> Cheers
>
> On Jan 20, 1:57 pm, cajchris  wrote:
>
> > Hey Rick,
>
> > That URL you posted is not valid, could you repost it please
>
> > Thanks
> > Chris
>
> > On Jan 20, 1:48 pm, "Rick Faircloth"  wrote:
>
> > > Forgot to mention...
>
> > > If you're using jQuery 1.3, there is now a built-in in .live function
> > > that you can use in place of LiveQuery, but it has some limitations for
> > > now that LiveQuery doesn't.
>
> > > > -Original Message-
> > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > > > Behalf Of cajchris
> > > > Sent: Tuesday, January 20, 2009 7:18 AM
> > > > To: jQuery (English)
> > > > Subject: [jQuery] Refreshing Menu after Adding New Structure
>
> > > > Hi,
>
> > > > I am wondering if there is a method to refresh or recall the JQuery
> > > > function that will process the unordered list and its list items in my
> > > > menu in order to add the JQuery specific information back in after
> > > > some new elements have been dynamically added to the menu structure.
>
> > > > As currently I have redrawn my unordered list HTML but it does not
> > > > contain the jQuery specific information and therefore I can no longer
> > > > hover over the links and see the sub menus.
>
> > > > Thanks in advance
> > > > Chris


[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread cajchris

Also is it fairly straightforward to use. The only thing that seems to
have been dropped are things like:

 replaced with just 

AND



replaced with 

This is why I need the JQuery to refresh and put these values back in

Cheers

On Jan 20, 1:57 pm, cajchris  wrote:
> Hey Rick,
>
> That URL you posted is not valid, could you repost it please
>
> Thanks
> Chris
>
> On Jan 20, 1:48 pm, "Rick Faircloth"  wrote:
>
> > Forgot to mention...
>
> > If you're using jQuery 1.3, there is now a built-in in .live function
> > that you can use in place of LiveQuery, but it has some limitations for
> > now that LiveQuery doesn't.
>
> > > -Original Message-
> > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > > Behalf Of cajchris
> > > Sent: Tuesday, January 20, 2009 7:18 AM
> > > To: jQuery (English)
> > > Subject: [jQuery] Refreshing Menu after Adding New Structure
>
> > > Hi,
>
> > > I am wondering if there is a method to refresh or recall the JQuery
> > > function that will process the unordered list and its list items in my
> > > menu in order to add the JQuery specific information back in after
> > > some new elements have been dynamically added to the menu structure.
>
> > > As currently I have redrawn my unordered list HTML but it does not
> > > contain the jQuery specific information and therefore I can no longer
> > > hover over the links and see the sub menus.
>
> > > Thanks in advance
> > > Chris


[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread cajchris

Hey Rick,

That URL you posted is not valid, could you repost it please

Thanks
Chris

On Jan 20, 1:48 pm, "Rick Faircloth"  wrote:
> Forgot to mention...
>
> If you're using jQuery 1.3, there is now a built-in in .live function
> that you can use in place of LiveQuery, but it has some limitations for
> now that LiveQuery doesn't.
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > Behalf Of cajchris
> > Sent: Tuesday, January 20, 2009 7:18 AM
> > To: jQuery (English)
> > Subject: [jQuery] Refreshing Menu after Adding New Structure
>
> > Hi,
>
> > I am wondering if there is a method to refresh or recall the JQuery
> > function that will process the unordered list and its list items in my
> > menu in order to add the JQuery specific information back in after
> > some new elements have been dynamically added to the menu structure.
>
> > As currently I have redrawn my unordered list HTML but it does not
> > contain the jQuery specific information and therefore I can no longer
> > hover over the links and see the sub menus.
>
> > Thanks in advance
> > Chris


[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread Rick Faircloth

Forgot to mention...

If you're using jQuery 1.3, there is now a built-in in .live function
that you can use in place of LiveQuery, but it has some limitations for
now that LiveQuery doesn't.


> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of cajchris
> Sent: Tuesday, January 20, 2009 7:18 AM
> To: jQuery (English)
> Subject: [jQuery] Refreshing Menu after Adding New Structure
> 
> 
> Hi,
> 
> I am wondering if there is a method to refresh or recall the JQuery
> function that will process the unordered list and its list items in my
> menu in order to add the JQuery specific information back in after
> some new elements have been dynamically added to the menu structure.
> 
> As currently I have redrawn my unordered list HTML but it does not
> contain the jQuery specific information and therefore I can no longer
> hover over the links and see the sub menus.
> 
> Thanks in advance
> Chris



[jQuery] Re: Refreshing Menu after Adding New Structure

2009-01-20 Thread Rick Faircloth

Hi, Chris...

Sounds like you need the LiveQuery plug-in.  It re-binds actions
to newly inserted DOM elements.  Add the LiveQuery plug-in to your
.click elements (or whatever action triggers them) and that will
probably fix your problem.

Look here for the plug-in and instructions.

http://brandonaaron.net/docs/livequery/

hth,

Rick



> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of cajchris
> Sent: Tuesday, January 20, 2009 7:18 AM
> To: jQuery (English)
> Subject: [jQuery] Refreshing Menu after Adding New Structure
> 
> 
> Hi,
> 
> I am wondering if there is a method to refresh or recall the JQuery
> function that will process the unordered list and its list items in my
> menu in order to add the JQuery specific information back in after
> some new elements have been dynamically added to the menu structure.
> 
> As currently I have redrawn my unordered list HTML but it does not
> contain the jQuery specific information and therefore I can no longer
> hover over the links and see the sub menus.
> 
> Thanks in advance
> Chris