I'm using jquery 1.3 and is trying to duplicate the 1.4 .has functionality.
I need to check if the .page element contains the image, and if it doesn't, append it.
Is it something like:
var imageid = thirdimage;
if ($('#page:has(#'+imageid+')') === undefined) {
$('#page').append($('#'+imageid));
}
Thanks.
if( $('#page').find('#'+imageid).length )
// I has the image! :P
$('#page').find('#'+imageid).length == 0
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