Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery flickering background image
    primarykey
    data
    text
    <p>I have 2 questions regarding Jquery and a background image. I have a simple html page:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Dreamweaver test&lt;/title&gt; &lt;link rel='stylesheet' type='text/css' href='stylesheet.css'/&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="outer"&gt; &lt;div id="container"&gt; &lt;div id="inner"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And my css:</p> <pre><code> @charset "utf-8"; /* CSS Document */ * {margin:0;padding:0} /* mac hide \*/ html,body{height:100%;width:100%;} /* end hide */ body { background-color: black; text-align:center; min-height:468px;/* for good browsers*/ min-width:552px;/* for good browsers*/ } #outer{ height:100%; width:100%; display:table; vertical-align:middle; } #container { text-align: center; position:relative; vertical-align:middle; display:table-cell; height: 468px; } #inner { width: 500px; height: 500px; text-align: center; margin-left:auto; margin-right:auto; background-image: url(mainpage.jpg); } </code></pre> <p>As you can see i have a background image for the inner div and what I want is the following:</p> <p>I have created another image called mainpageflickering.jpg whichs is slightly different. I want that image to flicker (like a broken lamp) and I think it is possible to do that with jQuery, but I dont know how. So these are my 2 questions:</p> <p>How can I tell jQuery to use the background image to change? How can I tell jQuery to flicker (example: 2 seconds normal image, 1 second of flickering, 2 seconds normal image, 1 second of flickering(everytime))?</p> <p>I hope someone can help me out with this.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload