Menu icon Foundation
How to use a tags with data-toggle-focus?

Hi There,

I have a dropdown menu that's content should only be visible when clicked on the burger icon. I decided to go for the data-toggle-focus. Yet the list items in the menu are links to other parts, which are not working. The toggle-focus closes the list back because it unfocuses the toggle if I click on it. 

Could anyone give me a hint on how to prevent this behaviour?

Thanks a lot!

TG

plugin toggle data-toggle link

Hi There,

I have a dropdown menu that's content should only be visible when clicked on the burger icon. I decided to go for the data-toggle-focus. Yet the list items in the menu are links to other parts, which are not working. The toggle-focus closes the list back because it unfocuses the toggle if I click on it. 

Could anyone give me a hint on how to prevent this behaviour?

Thanks a lot!

TG

Rafi Benkual 3 months ago

Toggle focus is for inputs. You might have better luck using the regular toggler.

chirag 3 months ago

hello,

 

For the HTML structure we’ll have a main wrapper with the class “rg-gallery”. We’ll also give it the same ID. In another div with the class “rg-thumbs” we’ll add the structure of the Elastislide carousel:

 

<div id="rg-gallery" class="rg-gallery">

<div class="rg-thumbs">

<!-- Elastislide Carousel Thumbnail Viewer -->

<div class="es-carousel-wrapper">

<div class="es-nav">

<span class="es-nav-prev">Previous</span>

<span class="es-nav-next">Next</span>

</div>

<div class="es-carousel">

<ul>

<li>

<a href="#">

<img src="images/thumbs/1.jpg" data-large="images/1.jpg" alt="image01" data-description="Some description" />

</a>

</li>

<li>...</li>

</ul>

</div>

</div>

<!-- End Elastislide Carousel Thumbnail Viewer -->

</div><!-- rg-thumbs -->

</div><!-- rg-gallery -->

The thumbnails will have two data attributes that we’ll use later in our JavaScript. The “data-large” attribute will have the path to the large image and the “data-description” attribute will contain the caption of the image that we will display under the current large image.

 

For the structure of the large preview area we will create a jQuery template that we’ll add to the head of our document:

 

<script id="img-wrapper-tmpl" type="text/x-jquery-tmpl">

<div class="rg-image-wrapper">

{{if itemsCount > 1}}

<div class="rg-image-nav">

<a href="#" class="rg-image-nav-prev">Previous Image</a>

<a href="#" class="rg-image-nav-next">Next Image</a>

</div>

{{/if}}

<div class="rg-image"></div>

<div class="rg-loading"></div>

<div class="rg-caption-wrapper">

<div class="rg-caption" style="display:none;">

<p></p>

</div>

</div>

</div>

</script>

We are adding a condition that will make sure that the navigation is only shown if there is more than one image. The “rg-image” container will be used to add the large image.

regards

chirag

Tutuapp Android 9Apps Android Aptoide Android

 

TheGabornator 3 months ago

Hi Ralf, thank you. I'm afraid, the "normal" toggle is not the best option for me, as the dropdown menu will then only disappear if I click on the burger icon specifically. I would need something in between the focus and the normal toggler.

Taylor Shaw 2 months ago

The answers shared here gave me a better idea on How to use a tags with data-toggle-focus. I have been wondering about the same for quite a while now. Thanks for sharing the question here. Do share more such relevant questions. real estate image editing services

TVTAP APK 2 months ago

Download TVTAP APK for Android

https://tvtap.xyz/

Watch live tv on you android mobile phone

viren 26 days ago

Want To stream live tv streaming ?

Download tvtap apk

viren 26 days ago
jaastark 26 days ago

great post. thanks for sharing this post.

tutuapp

mehul 20 days ago

Thank you for posting such a great article! I found your website perfect for my needs

Railways Info

kapilhu 20 days ago

Thanks for such amazing post .

https://tvtap.win

zohabsahzad 17 days ago

Thank you for posting such a great article

 

<a href="https://www.allnewstv.net/category/star-plus/ishqbaaz-written-update/">ishqbaaz written update</a>

 

Rajesram 8 days ago
kenkoiii 7 days ago

A must-read a post. Great admin good keep up the nice work bouncing balls, red ball

rangrocks1 5 days ago

New application to download http://tvtapapp.com

jani about 9 hours ago

If you guys want to listen to some high-quality music then there is nothing better then the Deezloader Apk And you can also download it for free from the Google. Deezloader is not available with the name of Deezloader Reborn.