xml attribute not working in safari and google chrome
Here is the code snippet. the var url is undefined in some browsers.
-
$.ajax({
url: "rss.php",
cache: false,
success: function(rss){
var count = 0;
var channel = $('channel',rss).eq(0);
$('item', rss).each( function() {
var media = $(this).find('media\\:content').eq(0);
var url = media.attr("url");
This works fine in IE and Firefox. But Google Chrome and Safari fails.
Using an rss plugin produces the same error, so it seems to be with jQuery.
Am I doing something wrong?