Hey guys is it possible to link a div and url? Basically I want 2 links in one . One link to target the #div and one to target the actual site url in the div.
I am targeting a div but need the url to load in the div.
<a href="http://site.com/product/product-link" class="class-here">
I can only access the div using this url:
<a href="#modal" class="class-here">
Better way to describe it would be like this, but this does not work obviously:
<a href="http://site.com/product/product-link" target="#modal" class="second">
I am hiding the div #modal in these tags:
{{#product_page}}
Content is here
{{/product_page}}
Hard one to explain, so any more detail let me know.
You were close, it is simply this:
<a href="http://site.com/product/product-link#modal">
You can link to any id by appending it to the end of the url, as an example, here is a link to my comment
I do not quite understand you want to do but this perhaps work
The id attribute can be used to create a bookmark inside an HTML document.
<div id="tips">Useful Tips Section</div>
Create a link to the "Useful Tips Section" inside the same document:
<a href="#tips">Visit the Useful Tips Section</a>
Or, create a link to the "Useful Tips Section" from another page:
<a href="http://www.w3schools.com/html_links.htm#tips">
Visit the Useful Tips Section</a>
I found this solution to work:
The HREF link:
<a href="javascript:$.closeit({ direction: 'left', href: 'http://site.com/product/product-link' })">
Places this script at the bottom of my page:
<script>
$(".class-here").closeit({ direction: "left", modal: true });
</script>
Thank you for everyone who assisted me.