# The image is visible only sometime, is something wrong in my javascript - halp

**URL:** <https://forum.kirupa.com/t/the-image-is-visible-only-sometime-is-something-wrong-in-my-javascript-halp/329918>\
**Category:** programming\
**Created:** [November 7, 2012, 5:07pm UTC](https://forum.kirupa.com/t/the-image-is-visible-only-sometime-is-something-wrong-in-my-javascript-halp/329918 "2012-11-07T17:07:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrin123](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@mrin123](https://forum.kirupa.com/u/mrin123)\
**Post date:** [November 7, 2012, 5:07pm UTC](https://forum.kirupa.com/t/the-image-is-visible-only-sometime-is-something-wrong-in-my-javascript-halp/329918/1 "2012-11-07T17:07:55Z")

</div>

Please see the script below, the image does show but only sometimes, can anyone help me figure out why, thanks

\<script src=“[http://cincinnati.com/scripts/jquery.min.js](http://cincinnati.com/scripts/jquery.min.js)” type=“text/javascript” charset=“utf-8”\>\</script\>

```
        &lt;script src="http://cincinnati.com/scripts/jquery.meerkat.1.3.min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;

       &lt;style type="text/css" media="screen"&gt;

                    #meerkat-wrapper {

                     width: 940px;

                       margin: 0 auto;

                    }

                    .ody-skin .ody-custom .footer-container div.ad_940x90 {width:100%}

                   .close-meerkat {

                         position: absolute;

                         display: block;

                         padding: 3px 3px 3px 3px;

                         font-family: arial, sans-serif;

                         font-size: 0.875em;

                        line-height: 10.8px;

                         text-decoration: none;

                         cursor: pointer;

                         z-index: 100003;

                     }

                     a.close-meerkat:link {color: #000; background-color: #cccccc; font-weight: bold;}

                     .dont-show {

                         position: absolute;

                         display: block;

                         width: 80px;

                         padding: 0 1px 2px 2px;

                         background-color: #cccccc;

                         font-family: arial narrow, sans-serif;

                         font-size: 0.705em;

                         text-decoration: none;

                         cursor: pointer;

                         z-index: 100002;

                         line-height: 10.8px;

                     }

                    

                            a.dont-show:hover {color:#FFF;}

                 .meerkat {

                        position: relative;

                        display: none;

                        z-index: 100000;

                    }

                    

                    a.click-through 

                    {

                    display: block;

                    position: absolute;

                    top: 10px;

                    height: 65px; 

                    bottom: 15px;

                    width: 890px;

                    z-index: 1; 

```

}

```
              .pos-bot .close-meerkat {right: 2px; top: 2px;}

                     .pos-bot .dont-show {right: 0px; top: 78px;}

         &lt;/style&gt;

         

         &lt;!-- CHANGE FILE NAME AND PATH TO AD FILE BELOW BEGINNING AT background: 'url(\'http://cincinnati.com --&gt;

         

    

       &lt;script type="text/javascript" charset="utf-8"&gt;

                  $(function(){

                  $('.meerkat').meerkat({                      

                  background:'url(\'http://cincinnati.com/sponsors/dashboard/43_103012_Fischr_Cin_96F8F6.jpg\') repeat-x left top',

                  height: '90px',

                  width: '940px',

                  position: 'bottom',

                  close: '.close-meerkat',

                  dontShowAgain: '.dont-show',

                  animationIn: 'fade',

                  animationSpeed: 500,

                  removeCookie: '.reset'

                  }).addClass('pos-bot');

                 $('#bottom').click(function(){

                 $('.meerkat').destroyMeerkat();

                 $('.meerkat').meerkat({

                 height: '90px',

                 width: '940px',

                 position: 'bottom',

                 close: '.close-meerkat',

                 dontShowAgain: '.dont-show',

                 animationIn: 'slide',        

                  animationSpeed: 500,

                 removeCookie: '.reset'

                 }).removeClass('pos-bot');

                 $('.code').hide();

                 $('.bottom_').show();

                 return false;

                             });

                         });

                         if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod') 

```

{

```
 $("#meerkat-wrapper").css("position", "static"); 

```

};

```
    &lt;/script&gt;

        &lt;div id="meerkat-wrapper"&gt;

```

\<div class=“meerkat”\>

\<a href=“_ADCLICK_” class=“click-through” target="\_blank"\>\</a\>

```
   &lt;a href="#" class="close-meerkat"&gt;x&lt;/a&gt;

            &lt;a class="dont-show"&gt;Don't Show Again&lt;/a&gt;   

      &lt;/div&gt;
```
