Jquery Text Variable
- by Batfan
I am trying to get jquery to pick up variable that I am defining and I'm having issues doing it.
$.ajax({
url: "sitemap.php",
cache: false,
success: function(html){
$("#results").append(html);
var $seriestitle = $("#define-title").text();
$('#results a:contains("$seriestitle")').addClass('current-series');
$('a:not(".current-series")').hide();
}
});
This is the code I am using. You can view the page at the following URL:
http://benjammindesigns.com/XML/details/1231.html
There is a span on the page, with the ID 'define-title', that contains text. I am trying to pull the text from that span and use it as my variable.
Any info is greatly appreciated.