• 0

Please help with my jquery issue, 2 scripts together


Question

I'm trying to get 2 jquery scripts to both work on the same page. One just shows text over a thumbnail when it's hovered over, the other just expands the thumbnail when it's click on. I'm so close I can almost taste it but I'm totally stumped now :/  To make things easier, here is a tiny .zip so you can see what I'm doing. http://www.classicdragons.org/TEMP.zip

 

Just open temp.html and you can see that the hover over jquery works perfectly, but clicking does nothing. Then just remove this from temp.html :

 

$(function() {
    $('img').hover_caption();
  });

 

...and you will see that the hover jquery is now of course broken but now the click to expand the thumbnail jquery works.

 

I'm desperately trying to get these to work together! Please help, I would really appreciate! Thank you in advance!!!!

 

Alex

14 answers to this question

Recommended Posts

  • 0

Ok, so far it appears that the overlay is getting in the way of letting you click the actual image when it is created. I am still looking.

 

EDIT: What about just changing the height of the caption overlay so it doesn't take up the whole image?

Edited by winlonghorn
  • 0

With help from winlonghorn, he has helped me so the hover over works and when I click on the image, it brings up the viewer. However the full image doesn't display in the viewer.

 

I have updated the link in my OP to reflect where I stand currently. I'm so close now! Just need to figure out why the image doesn't display in the viewer.

 

Any help much appreciated! Thanks!

  • 0

The reason that you don't see the full image is because of this code in /css/jsgallery.css:

 

.jsgallery-container #jsgall_imageContainer:before {    /* create a full-height inline block pseudo=element */
    content: ' ';
    display: inline-block;
    vertical-align: middle !important; 
    height: 100%;
}

That code is inserting a block above your full size image in the viewer that is the full height of the page, thus the full image is pushed off of the screen. Removing that style block makes your full-size image visible.

  • 0

When I remove that, the image appears, but then the full size image still has the shadow covering it until I move the courser off screen. Plus clicking anywhere doesn't remove the full size, it just reloads it.

 

But that is a step forward, thanks!!!!!!! I've been stuck on this for weeks lol.

  • 0

The reason that clicking on the full-size image doesn't close the full-size view is because you've setup the gallery script to run whenever an <img/> is clicked. Since the full-size image is rendered as an <img/> tag, clicking on it actually runs the gallery script again.

  • 0

I simply want to be able to mouse over an image (it's an art gallery web page with dozens of thumbnails on a page), the mouse over display a description of the image, then if clicked, the full size image shown. Then clicking anywhere will exit out of the full image view, or clicking next or swiping next when in full image view go to the next images in full size.

 

Thanks for any help, this is really challenging me, not my programming expertise at all :/

Edited by anguilla1980
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Display Driver Uninstaller (DDU) 18.1.1.4 by Razvan Serea Display Driver Uninstaller (DDU) is a utility for completely removing AMD/NVIDIA/INTEL graphics drivers and related packages from your system, attempting to eliminate all leftovers (including registry entries, folders and files, driver store). Though AMD/NVIDIA/INTEL drivers can usually be removed via the Windows Control Panel, this uninstaller tool was created for situations where standard uninstall fails, or when you need to fully remove NVIDIA or ATI graphics card drivers. After using this driver cleaner, your system will behave as though it’s the first time you’re installing a new driver—similar to a fresh Windows installation. As with all such tools, we recommend creating a restore point beforehand, allowing you to undo changes if issues arise. If you're having trouble installing an older or newer driver, try it—there are reports that it resolves such problems. Recommended usage: The tool can be used in Normal mode but for absolute stability when using DDU, Safemode is always the best. Make a backup or a system restore (but it should normally be pretty safe). It is best to exclude the DDU folder completely from any security software to avoid issues. You do NOT need to uninstall the driver prior using DDU. Requirements: .NET Framework 4.8 Compatible with Windows 7, 8, 8.1, 10, and 11 (32-bit or 64-bit) Note: Using on Insider Preview builds is at your own risk. Display Driver Uninstaller (DDU) 18.1.1.4 changelog: Intel: Added NPU presence detection before removing shared DLL files (these were previously left to prevent potential NPU-related issues). Intel: Added optional NPU removal Improved "Extension" driver removal process. Updated several translations. Download: Display Driver Uninstaller 18.1.1.4 | 1.7 MB (Freeware) Download: DDU Portable | 1.2 MB Links: Display Driver Uninstaller Home Page | Screenshot | Forum Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • That is what I also think to a point. How is 26 necessarily different than just another iteration like 18, 19, 20, etc? At first I think it would be better for Apple to use 2026, 2027, and then maybe truncate it to just 28, 29, and so on. Granted, I also think it makes more sense to use the year when it was released (2025 or 25), not 26/2026. Maybe Apple's thinking is as stated by Aditya that the bulk of a release being the current release is during the following year (2026, for example) after it is released (2025, for example). There are other examples of these sorts of things. In the NBA, the season has always started in the Fall and ends in the Spring. When the season ends is how the season is named. So, this is the 2025 NBA season and the Pacers and Thunder are playing to be the 2025 NBA Champions. The NFL starts in the Fall and the end of the season is always in the beginning of the next year as well. The Super Bowl was played on February 9, 2025, but that was the end of the 2024 NFL season. So, contrary to the NBA, the NFL names it season based on when it starts, not when it ends. Maybe that is because more of the NFL season is played at the end of the year (2024 in the most recent example) whereas most of the NBA season is played in the first half of the following year (2025 in the current example).
    • Years ago I was at COMDEX in Las Vegas and a pit boss told me all the casino hotel staff said of the geeks "They bring one clean shirt and a $10 bill and they don't change either one all week..."
    • I really hate Capcom for cutting all that content on RE3 Remake. It could have been a masterpiece like 2 Remake was.
    • Yes. Wouldn't want to confuse anyone from 1926 or 3026 who might look at it.
  • Recent Achievements

    • Week One Done
      abortretryfail earned a badge
      Week One Done
    • First Post
      Mr bot earned a badge
      First Post
    • First Post
      Bkl211 earned a badge
      First Post
    • One Year In
      Mido gaber earned a badge
      One Year In
    • One Year In
      Vladimir Migunov earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      495
    2. 2
      snowy owl
      252
    3. 3
      +FloatingFatMan
      251
    4. 4
      ATLien_0
      228
    5. 5
      +Edouard
      191
  • Tell a friend

    Love Neowin? Tell a friend!