I simplified my code and remove $("a) code too.. function updateNav(param) { $.ajax({ type: "POST", cache: false, url: "assets/ajax/updatenav.php", data: "opt="+param, success: function(d){ $("#nav").html(d); } }); }
and... <ul id="nav"> <li class="disabled">HOME</li> <li class="active"><a href="javascript:updateNav('menu');" class="menu">MENU</a></li> <li class="active"><a href="javascript:updateNav('catering');" class="catering">CATERING</a></li> <li class="active"><a href="javascript:updateNav('contact');" class="contact">CONTACT</a></li> </ul> ... and that worked. So how can I use jQuery to repeat my ajax call (s)? On Mar 15, 10:04 pm, "so.phis.ti.kat" <see.marlon....@gmail.com> wrote: > Question. > > I have it working right now but i can't get it to work more than > once. > I am using $.ajax(); and $("a").click(); to initiate this. > > 5 menu buttons, the first one always works, no matter which one, but > after it refreshes, the other buttons don't work. > > I am wondering if it is because I am using jQuery to enable my > clicks? > > On Mar 13, 1:23 pm, "so.phis.ti.kat" <see.marlon....@gmail.com> wrote: > > > Thanks Guys. > > I'll have a look now. > > > On Mar 11, 1:31 pm, Paul Hutson <hutsonphu...@googlemail.com> wrote: > > > > > > Ajax.Updater allows you to simply update the content of a DIV. > > > > If you want to go back to the super simple, you can update the inner > > > content of a div with: > > > > $("#DIVID").html("CONTENT"); > > > > i.e. : > > > <div id="blah"></div> > > > > <script> > > > $("#blah").html("I've just been added to the div blah..."); > > > </script> > > > > Therefore, on your callback from the AJAX - as mkmanning has posted - > > > you could do the update using the items that come back from the ajax. > > > > Regards, > > > Paul