Solved

jquery handle on underlying element

Posted on 2013-11-17
7
288 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

776 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