Hello,
I'd like to use JQuery for calculating the padding-right for some td. It works in a browser, but not in Princexml. After some research, I discovered, that the problem can be reduced to this code:
The problem is this line $(this).width();. The error message is
I changed the code to see what's going on
and the error message is a little bit confusing:
$(this) is an object, but I get a TypeError, because it's not an object...?!?
Soo.. What's the problem?
Kind regards,
chops
I'd like to use JQuery for calculating the padding-right for some td. It works in a browser, but not in Princexml. After some research, I discovered, that the problem can be reduced to this code:
$('td.centeredright16').each(function(){
$(this).width();
});
The problem is this line $(this).width();. The error message is
prince: http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js:2: error: TypeError: value is not an object
I changed the code to see what's going on
$('td.centeredright16').each(function(){
console.log(typeof($(this)));
console.log($(this).width());
})
and the error message is a little bit confusing:
object
prince: http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js:2: error: TypeError: value is not an object
object
prince: http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js:2: error: TypeError: value is not an object
$(this) is an object, but I get a TypeError, because it's not an object...?!?
Soo.. What's the problem?
Kind regards,
chops