Solved

jquery handle on underlying element

Posted on 2013-11-17
7
286 Views
Last Modified: 2013-11-17
I created a gallery slideshow using javascript routines.

I tried to add a button with a script, that would act as a 'pin it' button for the active image on the slideshow.

At the moment, the 'pinit' button appears when I hover over the active, however using my script, I don't know how to get a handle on the image.

Can anyone suggest a solution
Here is a link to the gallery
http://www.lily-g.com.au/index4.php

the pin-it image appears when you hover over the active image.

thanks
0
Comment
Question by:joomla
  • 4
  • 3
7 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39655263
What is it you are wanting - the URL?

You could just use

$(".add-image>img").attr("src")



p.s.
Research image optimization.
0
 

Author Comment

by:joomla
ID: 39655273
Hi Gary
thanks for the reponse

I added alert($(".add-image>img").attr("src")); but get an 'undefined' msg

PS... any help on 'image opt' glady taken onboard
0
 
LVL 58

Accepted Solution

by:
Gary earned 220 total points
ID: 39655305
Should be

alert($(".ad-image>img").prop("src"))
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 58

Expert Comment

by:Gary
ID: 39655308
There are a number of different software programs that will do optimization for the web.
I use Photoshop

http://download.cnet.com/JPEG-Photo-Optimizer-for-Web/3000-2192_4-10965673.html
0
 

Author Closing Comment

by:joomla
ID: 39655316
thank you so much for you excellent answer and your advice re image optimisation
regards
0
 

Author Comment

by:joomla
ID: 39655494
Gary,
sorry to pester you, but can you tell me why the script I'm using bombs out in IE (8,9,10)
0
 

Author Comment

by:joomla
ID: 39655513
Sorry Gary,
found the issue was with my attempt to open a blank window

we realized that IE does not support a name as second argument.
regards
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now