Little HTML Help Needed.
2013-10-28, 10:12 PM,
#1
So I am creating a new landing page and I wanted to make an image to change once clicked but I already have an onclick function with a pop-up message..

Does anyone know how to do it?

I already have a hover and an onclick effect..

Any help is appreciated.

[Image: H6JU6ed.png?1]
2013-10-28, 10:16 PM,
#2
It'd be helpful if you elaborate more. Or if you wish I can help you with this on skype.
2013-10-28, 10:21 PM,
#3
(2013-10-28, 10:16 PM)Springfire Wrote: It'd be helpful if you elaborate more. Or if you wish I can help you with this on skype.

What I mean is I have a picture and when someone hovers the mouse over it it changes and he moves his mouse out again it returns to normal. Now what I want to add is that if the user clicks the image a new "marked" image will appear. What code should I use to have something like this?

[Image: H6JU6ed.png?1]
2013-10-28, 10:21 PM,
(This post was last modified: 2013-10-28, 10:22 PM by Remco.)
#4
Make a javascript alert, search it on google.nl
The code is: <a href="#" onClick="your js code"><img src="img.jpg" /></a>
I dont know what the javascript code is.
Edit: Nvm, you have to do transform effects, search that on google. It has to do with CSS
2013-10-28, 10:34 PM,
#5
I changed the src attribute on click with jquery like this:

Code:
$( ".img" ).click(function() {
  $(".img").attr("src", "http://path-to-new-image");
});


Is this you'd expect?

Demo: http://jsbin.com/aGojIPi/1/
2013-10-28, 10:37 PM,
#6
(2013-10-28, 10:21 PM)Skouti Wrote:
(2013-10-28, 10:16 PM)Springfire Wrote: It'd be helpful if you elaborate more. Or if you wish I can help you with this on skype.

What I mean is I have a picture and when someone hovers the mouse over it it changes and he moves his mouse out again it returns to normal. Now what I want to add is that if the user clicks the image a new "marked" image will appear. What code should I use to have something like this?

<img src="image1.gif" onmouseover="this.src='image2.gif'" onmouseout="this.src='image1.gif'">

Please quote me if you are replying to me so I would get a notification.

Get Youtube likes/views, SEO backlinks for only $5. Meet fiverr.

Get everything you need for Internet marketing! Meet SeoClerks.

Thanks for using my affiliate links Smile
2013-10-28, 10:41 PM,
(This post was last modified: 2013-10-28, 10:42 PM by Skouti.)
#7
(2013-10-28, 10:34 PM)Springfire Wrote: I changed the src attribute on click with jquery like this:

Code:
$( ".img" ).click(function() {
  $(".img").attr("src", "http://path-to-new-image");
});


Is this you'd expect?

Demo: /aGojIPi/1/

Yea, thanks im going to try this soon.

(2013-10-28, 10:37 PM)hibr3d Wrote:
(2013-10-28, 10:21 PM)Skouti Wrote:
(2013-10-28, 10:16 PM)Springfire Wrote: It'd be helpful if you elaborate more. Or if you wish I can help you with this on skype.

What I mean is I have a picture and when someone hovers the mouse over it it changes and he moves his mouse out again it returns to normal. Now what I want to add is that if the user clicks the image a new "marked" image will appear. What code should I use to have something like this?

<img src="image1.gif" onmouseover="this.src='image2.gif'" onmouseout="this.src='image1.gif'">

Well this is the hover code and I have applied it already. What I am looking for is when the user clicks the image another image appears.

[Image: H6JU6ed.png?1]
2013-10-28, 10:50 PM,
(This post was last modified: 2013-10-28, 10:54 PM by Atlantis.)
#8
(2013-10-28, 10:12 PM)Skouti Wrote: So I am creating a new landing page and I wanted to make an image to change once clicked but I already have an onclick function with a pop-up message..

Does anyone know how to do it?

I already have a hover and an onclick effect..

Any help is appreciated.

You could use some jQuery here:

http://jsfiddle.net/Atlantis3/Sevdm/439/

Do you have links to the images? Then I can create the whole thing for you.


[Image: wI9cuAG.png]
2013-10-28, 10:51 PM,
#9
(2013-10-28, 10:41 PM)Skouti Wrote:
(2013-10-28, 10:34 PM)Springfire Wrote: I changed the src attribute on click with jquery like this:

Code:
$( ".img" ).click(function() {
  $(".img").attr("src", "http://path-to-new-image");
});


Is this you'd expect?

Demo: /aGojIPi/1/

Yea, thanks im going to try this soon.

(2013-10-28, 10:37 PM)hibr3d Wrote:
(2013-10-28, 10:21 PM)Skouti Wrote:
(2013-10-28, 10:16 PM)Springfire Wrote: It'd be helpful if you elaborate more. Or if you wish I can help you with this on skype.

What I mean is I have a picture and when someone hovers the mouse over it it changes and he moves his mouse out again it returns to normal. Now what I want to add is that if the user clicks the image a new "marked" image will appear. What code should I use to have something like this?

<img src="image1.gif" onmouseover="this.src='image2.gif'" onmouseout="this.src='image1.gif'">

Well this is the hover code and I have applied it already. What I am looking for is when the user clicks the image another image appears.
Change onmouseover to onmouseclick. It should work.

Please quote me if you are replying to me so I would get a notification.

Get Youtube likes/views, SEO backlinks for only $5. Meet fiverr.

Get everything you need for Internet marketing! Meet SeoClerks.

Thanks for using my affiliate links Smile
2013-10-28, 10:56 PM,
#10
(2013-10-28, 10:51 PM)hibr3d Wrote:
(2013-10-28, 10:41 PM)Skouti Wrote:
(2013-10-28, 10:34 PM)Springfire Wrote: I changed the src attribute on click with jquery like this:

Code:
$( ".img" ).click(function() {
  $(".img").attr("src", "http://path-to-new-image");
});


Is this you'd expect?

Demo: /aGojIPi/1/

Yea, thanks im going to try this soon.

(2013-10-28, 10:37 PM)hibr3d Wrote:
(2013-10-28, 10:21 PM)Skouti Wrote:
(2013-10-28, 10:16 PM)Springfire Wrote: It'd be helpful if you elaborate more. Or if you wish I can help you with this on skype.

What I mean is I have a picture and when someone hovers the mouse over it it changes and he moves his mouse out again it returns to normal. Now what I want to add is that if the user clicks the image a new "marked" image will appear. What code should I use to have something like this?

<img src="image1.gif" onmouseover="this.src='image2.gif'" onmouseout="this.src='image1.gif'">

Well this is the hover code and I have applied it already. What I am looking for is when the user clicks the image another image appears.
Change onmouseover to onmouseclick. It should work.
It doesn't work.

[Image: H6JU6ed.png?1]


Possibly Related Threads...
Thread Author Replies Views Last Post
  Clash of Clans HTML template - HQ template M!st3r XX 20 6,552 2017-09-25, 05:32 AM
Last Post: potter1594
  ▉ ▊AWESOME CONTENT WRITER NEEDED ▉ ▊ - Reviewer, Guider, Idolistic Figure, News Mania WealthyHustler 2 264 2017-08-08, 08:08 PM
Last Post: WealthyHustler
  Landing page movie Needed Krymi15 0 246 2017-08-04, 03:03 PM
Last Post: Krymi15
  [HELP NEEDED] Embedding P*rn videos to my adult WordPress Site nudes 15 1,789 2017-06-16, 02:09 PM
Last Post: tropicallad
  Help needed - Download link freakkz 3 529 2017-01-29, 10:23 PM
Last Post: CharlieHarper




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top