Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Jquery and dynamic content

Posted on 2009-07-14
5
Medium Priority
?
449 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

610 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