Click here to Skip to main content
15,905,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have multiple pages that loads inside an div while navigate, the script written inside page 1 overlaps with the script written in page 2. Likewise the script that loaded in previous page also loads in the current page. I use load() to load an html page


JavaScript
$(document).off('click','.areaClk');
$(document).on('click','.areaClk',function(){
    $(this).addClass('keyenable');
});


What I have tried:

i have tried
JavaScript
remove()
,
JavaScript
off(click)
but not succeed
Posted
Updated 8-May-19 5:28am

1 solution

If you wish to goggle a range of web pages on your "main" page, might I suggest you create and <iframe> (or several)

You can toggle the views, depending upon your taste and if content is changeable, by changing the target (in a single iframe), causing reloading. For multiple frames, you can shuffle them with the z-index and make use of hidden/visible states.

If the results, as you navigate, keep changing the various pages, I'd go for the first option and repeatedly reload the cage - make sure you handle the cache!


 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900