Rogue display:inline gets added via firefox WTF :-(

Maybe its because its cumming up to halloween but when in firefox v 24 this page gets a display:none attribute added into the image urls e.g:
<img*alt=“pavilion hotel wedding 2012”*src=“SiteFiles/img/pavilion-hotel-york-madonna-small.jpg”*style=“display: none;”> and illustrated here:

But watch out its quick tricky to replicate… bizarely you if you go to this url and wait for at leas 20 seconds then go to the dispaly none attribute is added :frowning:

This is causing my home page to appear blank.

Any insights welcome, i am so so confused…


The issue you’re seeing is been caused by the below JavaScript

$(function() {    var $container 	= $('#am-container'),
        $imgs		= $container.find('img').hide(),
        totalImgs	= $imgs.length,
        cnt			= 0;
    $imgs.each(function(i) {
        var $img	= $(this);
        $('<img/>').load(function() {
            if( cnt === totalImgs ) {

The reason you’re seeing display: none/inline is because the images are been hidden just as the page has loaded, the reason inline appears is because images are inline elements therefore jQuery assumes their default state again. By looking at the code briefly I would say that the load function isn’t executing correctly in Firefox which is why you’re seeing mixed results.

Thanks Chris :slight_smile: I should be able to apply the fix within the next two days, I’ll keep you posted.