1 Replies - 486 Views - Last Post: 17 September 2011 - 09:35 AM

#1 theseamusjames   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 17-May 10

A very odd AJAX problem

Posted 15 September 2011 - 11:53 AM

I'm using jQuery to load some content via AJAX. Problem is, whenever I load a module for the first time, and javascript that is contained in that module is not executed. However, every time I load that module thereafter, the javascript executes just fine. Here's a basic example of what I'm talking about:

1. Load my page. From here, my menus will load all content via AJAX.
2. Click a menu. The page this is set to load includes a jQuery Tabs plugin, so I have a little script that activates the jquery. It looks like this:

                $(function() {
			$("#tabs").tabs();
		});



3. That code doesn't execute the first time, so my page looks like crap. I also added an alert in there, and it too didn't execute.
4. Click that same menu again to reload that center content. Everything loads fine.

Any ideas?

This post has been edited by theseamusjames: 15 September 2011 - 11:55 AM


Is This A Good Question/Topic? 0
  • +

Replies To: A very odd AJAX problem

#2 rajesh.kakawat   User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 43
  • Joined: 03-January 11

Re: A very odd AJAX problem

Posted 17 September 2011 - 09:35 AM

so what do you want ?

do you want that tab should only be display on menu click.
When first time page load , only some link would have seen .
If I am right than reply
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1