0

I have a page loaded within a page. On the original page everything works fine. However, when loaded within another page, the .on('click') stops functioning after about 5 seconds. It's not in a timer. There are two timers on the page, but when turned off they have no effect on the freezing of the loaded page after about 5 seconds.

I tested this in IIS and WAMP, but neither work, so I highly doubt it's the server.

JVE999
  • 3,327
  • 10
  • 54
  • 89
  • 3
    Can you provide us with some code to have a look at? – avitex Aug 12 '13 at 09:17
  • Sure, one second, I'll have to upload the entire site. – JVE999 Aug 12 '13 at 09:17
  • Can you show just the bit of code that affects the problem? No the whole site please. And is it possible that it takes up to 5 seconds to load the page and that there just is an error? Look in your console. – putvande Aug 12 '13 at 09:18
  • How are you loading the 2nd page. Also did you check the console? Im thinking conflict. the 5 seconds maybe the time i requires to load the 2nd page. Sharing your source code maybe a good idea to move forward. – Roy M J Aug 12 '13 at 09:19
  • The problem is the code works fine on its own. It's just when it's on another page in a `.load()` function that it freezes after 5 seconds. So, the example code would just be `$(this).load('example.php');` – JVE999 Aug 12 '13 at 09:20
  • It loads the page immediately, works for about 5 seconds, and then the buttons triggered with `.on('click')` stop working. Also, in the console everything is fine. I'll work on uploading it to the internet. – JVE999 Aug 12 '13 at 09:20
  • Okay.. jquery's "this" is very tricky. if you are making any kind of external calls, this becomes invalid. http://stackoverflow.com/questions/7389944/this-vs-this-in-jquery – Roy M J Aug 12 '13 at 09:24
  • It's actually `$("#html_currentthread").load();` The page loads fine, so I don't think actually loading the page is the problem. – JVE999 Aug 12 '13 at 09:26
  • what's the core of your click function ? Are there others trigger that are frizzed or only clicks events ? There is no recursivity or what ? – TCHdvlp Aug 12 '13 at 15:19
  • It's `.on('click', function () {})` There's no recursivity. It's a simple click function. There are very similar triggers that work fine. – JVE999 Aug 14 '13 at 05:46

0 Answers0