Quantcast
Channel: VBForums - jQuery
Viewing all articles
Browse latest Browse all 69

how do i access the eliments of a page that has been .load() into a new page

$
0
0
Hello everyone

i am new to jquery but love it already ( i am a php programmer).

i have just use the .load() function to load content from another page to a new page. i am able to load the contents.

However, i now wish to accesssome elements of the newly loaded content but i am not able to do this.

PHP Code:


  
$(document).ready(function() {

  $(
'#signin a').click(function() {
     var 
url=$(this).attr('href');
     $(
'#loginpostion').load(url ' #loginform');
     return 
false;
 
 
    $(
'#closebox a').click(function() {
        
         
alert('itworks');
    
//     $('#loginpostion').removeClass()
        
     
return false;
        
        
  }); 
//end click 

i wish to access the following A tag from the newly loaded page: #closebox a

Is there anything that i need to do to let Jquery know that the "newly loaded content" will now form part of the DOM of the current page

warm regards

Andreea

Viewing all articles
Browse latest Browse all 69

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>