dgrafx
asked on
how to grab and display an element with specified class
after a form is submitted I have a success function:
success: function(data) { ....
what i want to do is check to see if data contains a div with a specified class.
if yes then display that element and if no then continue on as normal.
thanks
success: function(data) { ....
what i want to do is check to see if data contains a div with a specified class.
if yes then display that element and if no then continue on as normal.
thanks
ASKER
i've seen this link
i'm unable to find the correct syntax
that's why i asked the question
i'm unable to find the correct syntax
that's why i asked the question
check this
$(".classname").each(funct ion(index) {
alert(index + ': ' + $(this).text());
});
$(".classname").each(funct
alert(index + ': ' + $(this).text());
});
ASKER
so where are we inputting data (as in function(data)) ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you have got your solution from the comments else by your own.
ASKER
of course i derived the solution on my own and from googling.
it's not a problem but all you did was post a couple links that did not address the issue.
have a good one ...
it's not a problem but all you did was post a couple links that did not address the issue.
have a good one ...
ASKER
solution is provided
$(".classname")
Take a look into the sample
http://api.jquery.com/class-selector/