You are viewing our Forum Archives. To view or take place in current topics click here.
Trying to create a Modal Image for my Portfolio
Posted:

Trying to create a Modal Image for my PortfolioPosted:

-Goosty-
  • 2 Million
Status: Offline
Joined: Apr 20, 201311Year Member
Posts: 1,152
Reputation Power: 58
Status: Offline
Joined: Apr 20, 201311Year Member
Posts: 1,152
Reputation Power: 58
I'm trying to create a modal image for my portfolio with this image I have.

[ Register or Signin to view external links. ]

now, I have the image on and stuff but when I click on it it just opens to something like this. (On its own page)

[ Register or Signin to view external links. ]

I'm trying to make it so its like this when you click on it.

[ Register or Signin to view external links. ]

I tried plugging all that info in and I couldn't get it to work. If anyone could Skype me and I could share screens or anything that would be great. Thanks!
#2. Posted:
Cyimking
  • E3 2016
Status: Offline
Joined: May 02, 201212Year Member
Posts: 1,129
Reputation Power: 34
Status: Offline
Joined: May 02, 201212Year Member
Posts: 1,129
Reputation Power: 34
Try using a front-end framework like bootstrap. It makes front-end development easier and faster.

[ Register or Signin to view external links. ]
#3. Posted:
Xaldin
  • 2 Million
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Its opening on its own page because you have a link on it that opens that up, the modal that you want doesnt work by a link it works by taking a hidden element and making it visible with some other stuff. Even if you copied that and had it all working onclick you need to get rid of the link or it will just redirect before loading the stuff you are trying to get.
you most likely have something like this
<a href="image-large.jpg"><img src="image.jpg" alt="related photo" title="related photo" /></a>

but it sounds like you dont want the anchor tags you just want your js function to activate.
#4. Posted:
CriticaI
  • Christmas!
Status: Offline
Joined: Nov 05, 201310Year Member
Posts: 2,743
Reputation Power: 449
Status: Offline
Joined: Nov 05, 201310Year Member
Posts: 2,743
Reputation Power: 449
Your problem is it is wrapped in a link.
If you don't want it to open in a separate page, simply leave the image by itself.

Here is a JSfiddle that I made if you want to look how I did it.
[ Register or Signin to view external links. ]
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.