BoneStarr BoneStarr - 5 months ago 81
HTML Question

Isotope Filter link to a URL [Not filter]

I've set up Isotope to filter correctly like so:

<ul id="picture-filter" class="picture-filter clearfix" data-container="#picture">
<li class="activeFilter"><a href="#" data-filter="*">Show All</a></li>
<li><a href="#" data-filter=".landscape">Landscape</a></li>
<li><a href="#" data-filter=".portrait">Portrait</a></li>
<li><a href="#" data-filter=".women">Sketches</a></li>
<li><a href="see-more.html">See More</a></li>
</ul>


But I wanted to add an external link: "See More" that links to another page, the link isn't working and instead Isotope is showing all when you click it. Is there way to make the link work but keeping it inside the ul class?

Answer

In case anyone was interested I found out how to do this. Useful if you have a series of elements within a function but one to link one of them to a URL:

By adding an on click event within the element itself

onclick="location.href='your-url'; return false;"

This answers the below:

<ul id="picture-filter" class="picture-filter clearfix" data-container="#picture">
                    <li class="activeFilter"><a href="#" data-filter="*">Show All</a></li>
                    <li><a href="#" data-filter=".landscape">Landscape</a></li>
                    <li><a href="#" data-filter=".portrait">Portrait</a></li>
                    <li><a href="#" data-filter=".women">Sketches</a></li>
                    <li><a a href="#" onclick="location.href='see-more.html'; return false;">See More</a></li>
                </ul>