?
Solved

Jquery and dynamic content

Posted on 2009-07-14
5
Medium Priority
?
446 Views
Last Modified: 2012-05-07
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

0
Comment
Question by:cone13cone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
Seo_Expert earned 1500 total points
ID: 24856538
0
 
LVL 7

Expert Comment

by:Seo_Expert
ID: 24856549
Hello

Here is sample example of jquery ajax

http://www.sitepoint.com/article/ajax-jquery/
0
 

Author Comment

by:cone13cone
ID: 24856627
any example codes i keep trying the jquery sites but im not having any luck.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 24856663
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.
0
 

Author Comment

by:cone13cone
ID: 24856672
ok, I got it, thanks.
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question