|
| 26 Feb 2013 07:26 PM |
so i want an image to appear for 1 second then disappear for 1 second. then i want it to appear for 2 second and disappear for 1 seconds. How would I do this?
Thanks |
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 26 Feb 2013 07:28 PM |
| Javascript, PHP, and other languages(_NOT_ markups). |
|
|
| Report Abuse |
|
|
| |
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
|
| 26 Feb 2013 07:29 PM |
| Impossible, do it in javascript. |
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 26 Feb 2013 07:30 PM |
| HTML is only read once, when the page loads, and not afterwards. |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2013 07:33 PM |
does anyone have a script that could do this?
all i can think of is that i would need to use the for loops that i learned on codeacademy. but, all i learned to do is loop numbers; not pictures. |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2013 07:34 PM |
"HTML is only read once, when the page loads, and not afterwards."
i just want to make it so that i flash for let's say 5 times. then the image stays on the webpage. |
|
|
| Report Abuse |
|
|
Bubby4j
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 1831 |
|
|
| 26 Feb 2013 10:21 PM |
| Basically, you'd need to change the CSS display property of the image on the page to be hidden and then visible back and forth. |
|
|
| Report Abuse |
|
|
Charl3s7
|
  |
| Joined: 07 Dec 2007 |
| Total Posts: 4146 |
|
|
| 26 Feb 2013 11:33 PM |
| HTML simply stores the page information. Use JavaScript to modify that information. |
|
|
| Report Abuse |
|
|
belial52
|
  |
| Joined: 10 Oct 2009 |
| Total Posts: 8074 |
|
|
| 26 Feb 2013 11:46 PM |
| Why not just use a GIF? I mean, that's what they were made for... |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
| |
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
|
| 27 Feb 2013 07:16 AM |
^ It's better than learning Javascript. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2013 07:27 AM |
| @Garnished Haha, but I'd rather have JS run a simple pop up image instead of a laggy gif slowing down my page load times. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2013 07:34 AM |
I don't think GIFs are meant for use in web design like you suggest (i.e. extensive use).
I can't imagine it looking that good.
GIFs are still useful for distributing animated pictures, but on a website, they shouldn't replace what Javascript CAN, and SHOULD be doing because you can change the behaviour of Javascript easily.
Also, GIFs commonly use a web-safe palette. Not that good for modern web design. |
|
|
| Report Abuse |
|
|
Megolas
|
  |
| Joined: 16 Jan 2011 |
| Total Posts: 357 |
|
|
| 27 Feb 2013 08:45 AM |
| Pretty sure it can be done in CSS3, using its animations... |
|
|
| Report Abuse |
|
|
itunes89
|
  |
| Joined: 19 Jan 2011 |
| Total Posts: 1957 |
|
|
| 27 Feb 2013 11:11 AM |
jQuery is easier.
$("#YourImg").fadeOut('fast',0) |
|
|
| Report Abuse |
|
|
CheckWork
|
  |
| Joined: 24 Jul 2012 |
| Total Posts: 435 |
|
| |
|
|
| 27 Feb 2013 02:38 PM |
^ Are you some sort of troll? |
|
|
| Report Abuse |
|
|
itunes89
|
  |
| Joined: 19 Jan 2011 |
| Total Posts: 1957 |
|
|
| 27 Feb 2013 02:52 PM |
| What the heck! Java? Get out of this forum if you don't know what your talking about. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 27 Feb 2013 03:43 PM |
It would work in Javascript... window.setInterval("javascript function",milliseconds);
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
itunes89
|
  |
| Joined: 19 Jan 2011 |
| Total Posts: 1957 |
|
|
| 27 Feb 2013 06:08 PM |
| If you were talking to me. I know. I just enjoy jQuery much better. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 27 Feb 2013 07:22 PM |
No, I was talking to Garnished.
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2013 07:30 PM |
@Checkwork you made me laugh until I realized you were serious.
Javascript has nothing to do with Java and you should be ashamed. Its actual name is ECMAScript if you want to get technical. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2013 07:31 PM |
| @awsum It would look exceptionally bad and unprofessional. |
|
|
| Report Abuse |
|
|
| |
|