• 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

    • Ah .. lockout for suspicious activity. I bet they uploaded the SanDisk utility detected as malware
    • Microsoft 365 will soon disable outdated authentication protocols for file access by Usama Jawad On a fairly regular basis, Microsoft disables outdated protocols that are used to access its services. In the past few years, the company has deprecated Basic Auth in Exchange Online and cut access to Outlook for third-party apps relying on this protocol. Now, it has decided to get rid of old authentication protocols for file access across Microsoft 365 services. As reported by Bleeping Computer, Microsoft has posted a message on its Microsoft 365 Admin Center. Starting from mid-July 2025, the company will begin disabling legacy authentication protocols used to access files across Microsoft 365 and Office apps, SharePoint, and OneDrive. Essentially, applications or services which use the Relying Party Suite (RPS) or FrontPage Remote Procedure Call (FPRPC) will to perform browser-based authentication to perform open operations on Office files will no longer be able to do so. As expected, this is primarily being done to improve the cybersecurity posture of various services. Microsoft states that RPS can be brute-forced and phished with relative ease as it is fairly outdated. Similarly, FPRPC is typically used for remote web page authoring and it is susceptible to exploitation through various vulnerabilities too. As such, both of these protocols will be disabled by default starting from mid-July 2025, with the rollout of this change targeting completion by August 2025. The Redmond tech giant will update the protocol baseline by default without mandating any licensing changes for customers. In addition, once these modifications are rolled out, Microsoft 365 will require admin consent to get third-party access to files and sites. IT admins can view the guidance available here to configure admin consent workflows. Microsoft says that these changes align with the principles of its Secure Future Initiative (SFI). Earlier today, it announced the rollout of improved security defaults for Windows 365 citing the same reasons too.
    • It does and it can... I took an i3 board and upgraded it to my FX8350... no issues, just put in new drivers over the top that Windows didn't. Not the issue for me, (though I eventually did do a new install from 23H2 to 24H2)... I was on 22H2 at the time. The issue is activation. You may get hit with having to activate again.
  • Recent Achievements

    • First Post
      Fuzz_c earned a badge
      First Post
    • First Post
      TIGOSS earned a badge
      First Post
    • Week One Done
      slackerzz earned a badge
      Week One Done
    • Week One Done
      vivetool earned a badge
      Week One Done
    • Reacting Well
      pnajbar earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      708
    2. 2
      ATLien_0
      284
    3. 3
      Michael Scrip
      218
    4. 4
      +FloatingFatMan
      197
    5. 5
      Steven P.
      130
  • Tell a friend

    Love Neowin? Tell a friend!