Вопрос

I'm trying desperately to make the link on a linked image work but whenever I click on the link, my browsers (Chrome & Firefox) just tell me they are connecting to the page and I get a continuous spinning image as if the browser were doing something. The link works perfectly if I open in another tab.

The div in question is coded and styled in a Wordpress page. I am making changes to another developer's work for a customer.

Here's the div:

<div style="position: absolute; top: 645px; left: 80px; width: 150px;">
  <a href="http://themoneycouple.com/?p=4681" target="_top" style="display:inline-block">
    <img src="http://themoneycouple.com/wp-content/uploads/2013/10/kit-history.png" alt="Toolkit History Link" width="150" height="170" style="position:relative; display:block; z-index:999999999999;" />
  </a>
</div>

And here's the page it's on: http://themoneycouple.com/resources/love-and-money-kit/

I've tried changing the z-index on every element in multiple ways, tried changing the link target in every way possible, changed display settings, etc.

One last note, there are lots of iframes on this page and I'm not sure if those are messing things up somehow. Massive thanks for any help.

Это было полезно?

Решение

It looks like the URL for that HREF is trying to load a page as a modal using the fancybox protocol. Is this what is expected?

Does that page ID exist? It looks URL looks different from the other page URLs on the site.


There is a jQuery function that targets every IMG tag w/ an A tag and applies a class of "fancybox". Modify the specificity of this function to exclude the last item in the gallery. Better yet, create a new class and add it to the elements that should have the fancybox functionality. The same issue happens on other pages where the HREF goes to a page instead of opening an image.

Current jQuery function:

var thumbnails = jQuery("a:has(img)").not(".nolightbox").filter( function() { return /\.(jpe?g|png|gif|bmp)$/i.test(jQuery(this).attr('href')) });

thumbnails.addClass("fancybox").attr("rel","fancybox").getTitle();

Другие советы

I think I found the link you mean and it has a fancybox class on it, so I presume it is trying to open a fancybox javascript plugin popout for your link.. which is a redirect and failing to do so, since I can right click the link and go to open in new tab and it works.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top