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 <UL> structure with the
added <LI>

Even if I somehow managed to just locate the correct parent <UL> and
add in the new <LI> 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" <r...@whitestonemedia.com> 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 <UL><LI><A>Amex</A></LI></UL> is the newly added
> > structure):
>
> >                   <A id=m11780 title=FAQ onclick="" href="http://
> > localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">FAQ</A>
> >                   <UL>
> >                     <LI>
> >                     <A id=m11781 title="All Groups" onclick=""
> > href="http://localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">All Groups</A>
> >                     <UL>
> >                       <LI>
> >                       <A id=m-2 title=Amex onclick="" href="http://
> > localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">Amex</A>
> >                       </LI>
> >                     </UL>
> >                     </LI>
> >                     <LI>
> >                     <A id=m11782 title="Top 10" onclick=""
> > href="http://localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">Top 10</A>
> >                     </LI>
> >                     <LI>
> >                     <A id=m12668 title=AECustView onclick=""
> > href="http://localhost/servlet/
> > com.isa.balmoral.admin.process.PFrameworkServlet#">AECustView</A>
> >                     </LI>
> >                   </UL>
>
> > Before the innerHTML it was:
>
> >                   <A class=sf-with-ul id=m11780 title=FAQ onclick=""
> > href="#" jQuery1232463464064="85">FAQ<SPAN class=sf-sub-indicator
> > jQuery1232463464064="null">»</SPAN></A>
> >                   <UL style="DISPLAY: none; VISIBILITY: hidden"
> > oldblock="block">
> >                     <LI jQuery1232463464064="86">
> >                     <A id=m11781 title="All Groups" onclick=""
> > href="#" jQuery1232463464064="87">All Groups</A>
> >                     </LI>
> >                     <LI jQuery1232463464064="88">
> >                     <A id=m11782 title="Top 10" onclick=""  href="#"
> > jQuery1232463464064="89">Top 10</A>
> >                     </LI>
> >                     <LI jQuery1232463464064="90">
> >                     <A id=m12668 title=AECustView onclick="" href="#"
> > jQuery1232463464064="91">AECustView</A>
> >                     </LI>
> >                   </UL>
>
> > 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" <r...@whitestonemedia.com> 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:
>
> > > > <LI class="" jQuery1232455646417="3"> replaced with just <LI>
>
> > > > AND
>
> > > > <UL class="" style="DISPLAY: none; FILTER: ; VISIBILITY: hidden; ZOOM:
> > > > 1" oldblock="block" jQuery1232455646417="452">
>
> > > > replaced with <UL>
>
> > > > This is why I need the JQuery to refresh and put these values back in
>
> > > > Cheers
>
> > > > On Jan 20, 1:57 pm, cajchris <cajch...@gmail.com> 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" <r...@whitestonemedia.com> 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

Reply via email to