Link to home
Start Free TrialLog in
Avatar of cone13cone
cone13coneFlag for United States of America

asked on

Jquery and dynamic content

Hello,
I am currently trying to learn javascript by way of the missing manual: javascript.  I was starting to get a hand on javascript until I started using jquery.  My problem is that I can not figure out how to access dynamic content with jquery.  Been looking on the net for hours but was unable to come up with a solution.

The code below applys the greybox function to all  ('inpage a').  The problem I am having is not with the initial page, but when I dynamically load content with Ajax.  I guess i need a way to recall the function and reapply it to the dynamically loaded content.  

I thought I was on to something with the .live  but was unable to successfully implement it,  thanks in advance.
<script type="text/javascript">
$(document).ready(function() {
  var gbOptions = {
    gbWidth: 700,
    gbHeight: 550
  };
	$('.inpage a').greybox(gbOptions);
});
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Seo_Expert
Seo_Expert
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello

Here is sample example of jquery ajax

http://www.sitepoint.com/article/ajax-jquery/
Avatar of cone13cone

ASKER

any example codes i keep trying the jquery sites but im not having any luck.
Avatar of Zyloch
We really need to see more code; maybe your AJAX code, a demo page, or the code you've been trying on the jQuery sites that isn't working for you.
ok, I got it, thanks.