Andy Matthews wrote:
Your code is saying an A tag that has an id of response. To get a jQuery
object containing all a tags inside that div, it should look like this:
#response a
That says any A tag inside a container with an id of response.
If in doubt what a selector selects, use
Massimiliano Marini wrote:
Well, it depends. When you say that the content is generated
dynamically, are you saying that it's generated by a server side
language like ColdFusion or PHP?
I think this case, this is my code:
$.ajax({
type: GET,
url: news.php,
success: function(msg){
I did the same thing once and it took me asking the list to get the answer.
Now I know, and I'm able to pass it on to you.
andy
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Massimiliano Marini
Sent: Tuesday, June 12, 2007 5:26 PM
To:
Your code is saying an A tag that has an id of response. To get a jQuery
object containing all a tags inside that div, it should look like this:
#response a
That says any A tag inside a container with an id of response.
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL
Your code is saying an A tag that has an id of response. To get a
jQuery object containing all a tags inside that div, it should look
like this:
#response a
I have corrected as you have said, but still not work, this is the
correction I have applied:
$(#response a).click(function(){
Well, it depends. When you say that the content is generated dynamically,
are you saying that it's generated by a server side language like ColdFusion
or PHP? Or is it being generated by Javascript? If it's created by
javascript, after the page is loaded, then you'll need to reassign the click
Well, it depends. When you say that the content is generated
dynamically, are you saying that it's generated by a server side
language like ColdFusion or PHP?
I think this case, this is my code:
$.ajax({
type: GET,
url: news.php,
success: function(msg){
You have to rebind the clicks after the ajax loads:
$.ajax({
type: GET,
url: news.php,
success: function(msg){
$(#response).fadeIn(slow).html(msg);
$(#response a).click(function(){
alert(Hello);
return false;
)};
}
});
~Sean
You have to rebind the clicks after the ajax loads:
Thank you 1K Sean for and Andy, I've learned something new
--
Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
It's easier to invent the future than to predict it. -- Alan Kay
9 matches
Mail list logo