the below code is a sample code where $(this).html()
is not working when using jquery
version v1.10.2 but the same code is working when jquery
version is v1.6.4. see my code and give me suggestion how to get rid of this because our product is using jquery
version v1.10.2.
$elements.each(function () {
//alert($(this).text());
if ($(this).html() === null) {
$item = $('<li class="current" />').append($(this));
}
else {
if (!isNaN(parseInt($(this).text()))) {
$item = $('<li />').append($(this));
}
else {
$item = $('<li class="navpage"/>').append($(this));
//alert($(this).text());
}
}
$list.append($item);
});
full code found in this js fiddle link https://jsfiddle.net/tridip/41s1pq3a/38/
just see & run the jsfiddle
code with 2 different version called v1.6.4 and v1.10.2 then understand $(this).html()
is not working.
looking for suggestion what i need to change in code as a result $(this).html()
will start working in v1.10.2. thanks