troubleshooting Question

jquery submit form on click

Avatar of movieprodw
movieprodw asked on
jQuery
3 Comments1 Solution422 ViewsLast Modified:
Hello,

I have a large image gallery and I want the customer to be able to click on the 'add.jpg' and have the id get recorded to a php page.

Is there a way to make it so that when .rank is clicked it submits the id to /recordlike.php?id=####

<li><a class="fancybox" data-fancybox-group="gallery" href="45709.jpg"><img src="45709.jpg" width="200" /></a><img class="rank" id="5710" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="58491.jpg"><img src="58491.jpg" width="200" /></a><img class="rank" id="18492" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="42857.jpg"><img src="42857.jpg" width="200" /></a><img class="rank" id="2858" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="49360.jpg"><img src="49360.jpg" width="200" /></a><img class="rank" id="9361" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="70762.jpg"><img src="70762.jpg" width="200" /></a><img class="rank" id="30763" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="80173.jpg"><img src="80173.jpg" width="200" /></a><img class="rank" id="40174" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="68555.jpg"><img src="68555.jpg" width="200" /></a><img class="rank" id="28556" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="57394.jpg"><img src="57394.jpg" width="200" /></a><img class="rank" id="17395" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="46817.jpg"><img src="46817.jpg" width="200" /></a><img class="rank" id="6818" src="add.png"></li>
<li><a class="fancybox" data-fancybox-group="gallery" href="60705.jpg"><img src="60705.jpg" width="200" /></a><img class="rank" id="20706" src="add.png"></li>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros