SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    Maybe its because its cumming up to halloween but when in firefox v 24 this page www.davidclick.com 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:
    http://i216.photobucket.com/albums/c...ps1c692710.jpg

    But watch out its quick tricky to replicate... bizarely you if you go to this url http://www.davidclick.com/testimonials.html and wait for at leas 20 seconds then go to
    http://www.davidclick.com/index.html the dispaly none attribute is added :-(

    This is causing my home page to appear blank.

    Any insights welcome, i am so so confused...

    Thanks,
    David
    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,191
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The issue you're seeing is been caused by the below JavaScript

    Code 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() {
                ++cnt;
                if( cnt === totalImgs ) {
                    $imgs.show();
                    $container.montage();
                }
            }).attr('src',$img.attr('src'));
        });	
     
    });

    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.

  3. #3
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Chris :-) I should be able to apply the fix within the next two days, I'll keep you posted.
    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •