please help The jQuery Code:
jQuery.ajax({url:nextPortionLink,
success: function(data) {
nextPortion = jQuery("#productList", data).html();
}});
Variable data has html page with #productList, .productImage, a, img...
But any of these selectors doesn't work here. Why?
jQuery(data).find("anything") doesn't work either
nextPortion == null for Opera 9.6
This code works fine with IE7,8 FF3-4 but not in Opera 9.6 and IE9
check jQuery's dataType, should be "html":
jQuery.ajax({
url:nextPortionLink,
dataType: "html",
success: function(data) {
nextPortion = jQuery("#productList", data).html();
}
});
you must be sure that your jQuery obj is of dataType 'html', if not (OP will return null) you can force it to be 'html' using:
var data = jQuery(data).html();
find working example here: http://jsfiddle.net/aA3VN/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With