I am working on showing a message when a particular element has a width of less than 50, however there are multiple elements with the same class and only the first element in the page is displaying the message. here is the jsfiddle http://jsfiddle.net/MaNdn/23/
Here is the function.
function checkads() {
if ($('#container').height() < 50) {
$('#container').parent().parent().prepend('<div id="ad-notice">Please support our website</div>');
//
}
}
$(document).ready(checkads);
My question is, how do you make the message prepend to all element id instances found. I have various advertisements around my website, they are all wrapped in an div element named advertisement_container
then how do I match them all at once