HTML
You can see the below code which I am using but transition not working.
<div class="faq">
<input type="radio" id="faq1" class="input" name="faqs">
<label for="faq1">text 1</label>
<div class="answer">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit</p>
</div>
</div>
<div class="faq">
<input type="radio" id="faq2" class="input" name="faqs">
<label for="faq2">text 2</label>
<div class="answer">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit</p>
</div>
</div>
CSS
Here is the CSS that I am using for the transition.
.input, .answer
{
display: none;
transition: all 1s;
}
.faq input[type="radio"]:checked ~ .answer
{
display: block;
transition: all 1s;
}
Transition doesn't work with display none and block property. The reason for this is, display:none property is used for removing block and display:block property is used for displaying block. A block cannot be partly displayed. Either it is available or unavailable. That is why the transition property does not work.
Optionally, You can play with height and opacity, and much better if you are comfortable with javascript. You can make smooth animation with js.
Just in case you want to do this with CSS here is a way to make it work:
.input, .answer
{
opacity: 0;
transition: height 1s, opacity .5s;
background: aqua;
height: 0;
}
.faq input[type="radio"]:checked ~ .answer
{
opacity: 1;
height: auto;
transition: height 1s, opacity .5s;
}
<div class="faq">
<input type="radio" id="faq1" class="input" name="faqs">
<label for="faq1">text 1</label>
<div class="answer">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit</p>
</div>
</div>
<div class="faq">
<input type="radio" id="faq2" class="input" name="faqs">
<label for="faq2">text 2</label>
<div class="answer">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit</p>
</div>
</div>
Related
This question already has answers here:
How do I match any character across multiple lines in a regular expression?
(26 answers)
RegEx match open tags except XHTML self-contained tags
(35 answers)
My regex is matching too much. How do I make it stop? [duplicate]
(5 answers)
Regular expression to get a string between two strings in Javascript
(13 answers)
Closed 4 years ago.
I'd like to create a regex to match content between tags.
My regex that is not working : new RegExp("page.content_before(.+)\/page.content_before", "g").exec(myText)[0]
myText :
page.title
Accueil
/page.title
page.content_before
[slides]
<div>
<div class="line">
<div class="col-12">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit excepturi consequatur inventore alias ducimus tenetur libero iste nesciunt soluta esse et debitis aliquid, voluptatum placeat veritatis! At dolorem repellat doloremque!
</div>
</div>
</div>
<div>
<div class="line">
<div class="col-12">
[articles]
</div>
</div>
</div>
<div>
<div class="line">
<div class="col-12">
[vehicles]
</div>
</div>
</div>
/page.content_before
page.content
<div class="line">
<div class="col-8">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam officiis eos quis eum in sapiente aliquid placeat excepturi ratione suscipit quisquam exercitationem necessitatibus totam vel, ullam assumenda optio aspernatur incidunt.
</div>
<div class="col-4">
Social.
</div>
</div>
/page.content
page.content_after
[googlemap]
/page.content_after
page.seo_title
Accueil
/page.seo_title
page.seo_url
accueil
/page.seo_url
The result should be :
[slides]
<div>
<div class="line">
<div class="col-12">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit excepturi consequatur inventore alias ducimus tenetur libero iste nesciunt soluta esse et debitis aliquid, voluptatum placeat veritatis! At dolorem repellat doloremque!
</div>
</div>
</div>
<div>
<div class="line">
<div class="col-12">
[articles]
</div>
</div>
</div>
<div>
<div class="line">
<div class="col-12">
[vehicles]
</div>
</div>
</div>
I created a top-bar menu using Foundation 6 looking at its documentation and some tutorials on its page. I managed to make it work responsively, changes from dropdown to drilldown when in mobile view. All ok, but I'm missing something here. The dropdown boxes don't expand to make menu options one line each. The Foundation class "is-dropdown-submenu" set a min-width of 200px. But that doesn't work as a minimum width. It works as the max-width because dropdown boxes doesn't expand beyond that value. I have to manually set a larger width to place all my menu options in one line each. Is there any way to dropdown boxes adjust its size automatically?
Any ideas?
<div class="top-bar">
<div class="wrapper">
<div class="top-bar-title">
<span data-responsive-toggle="responsive-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle></button>
</span>
<img class="logo" src="https://placehold.it/145x40&text=LOGO">
</div>
<div id="responsive-menu">
<div class="top-bar-left">
<ul class="vertical medium-horizontal menu navigation" data-responsive-menu="drilldown medium-dropdown"
data-back-button='<li class="js-drilldown-back"><a tabindex="0">Return</a></li>'>
<li>
Lorem Ipsum
<ul class="vertical menu">
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum Dolor Sit Amet</li>
<li>Lorem Ipsum Dolor Sit Amet</li>
</ul>
</li>
<li>
Lorem
<ul class="vertical menu">
<li>Ipsum</li>
<li>Lorem Ipsum Dolor Sit Amet</li>
<li>Lorem Ipsum Dolor</li>
</ul>
</li>
<li>Lorem Ipsum Dolor Sit Amet</li>
<li>Lorem</li>
</ul>
</div>
</div>
</div>
</div>
Here's my codepen
I want to create a full-width dropdown mega menu that I can also combine with a top bar that has an drilldown menu in mobile screens. Any method I've tried on Foundation only works with Foundation 5, since they changed top bar in Foundation 6.
So far, (with the help from this thread: http://foundation.zurb.com/forum/posts/36800-f6-and-mega-menus) I have been able to create the dropdown mega menu and on small screens, the title bar appears and toggles open. However, when I try to open an item with a drilldown submenu, it still treats it as though it is a dropdown item.
Also, I am noticing that full-width hover for the submenus are somehow pushing the screen to a lot of extra empty space horizontally. While I can get rid of the extra empty horizontal space by adding a max-width:100% to the dropdown-pane class, the second of my two mega submenus doesn't display full-width correctly when I hover over them. Although in the codepen, they show just fine.
This is the link to the codepen: http://codepen.io/jen188/pen/PzRkbg
This is the code for my header;
<header>
<div class="row columns expanded">
<img src="img/REPLogo.png" alt="Real Estate Promo" class="logo show-for-small-only" />
<div class="title-bar" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu">
<div class="top-bar-left"><a href="index.html"><img src="img/REPLogo.png" alt="Real Estate Promo" class="logo hide-for-small-only" /></div>
<div class="top-bar-right">
<ul class="vertical medium-horizontal expanded dropdown menu" data-responsive-menu="drilldown medium-dropdown">
<li>About Us</li>
<li>Events Calendar</li>
<li class="has-submenu is-drilldown-submenu-parent">
<a href="#" class="dropdown" data-toggle="megamenu-resources">Resources
<div class="dropdown-pane" id="megamenu-resources" data-dropdown data-options="closeOnClick:true; hover: true; hoverPane: true">
<div class="row column expanded">
<div class="large-9 columns">
<div class="row column expanded">
<div class="large-4 columns">
<ul>
<li><h3>Foreclosure Laws</h3></li>
<li><img src="img/laws.png" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="large-4 columns">
<ul>
<li><h3>Hard Money Lenders</h3></li>
<li><img src="img/coin-stack.png" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="large-4 columns">
<ul>
<li><h3>Real Estate Glossary</h3></li>
<li><img src="http://placehold.it/500x250" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
</div>
</div>
<div class="large-3 columns">
<ul>
<li><h3>Find a REIA</h3></li>
<li><img src="img/map-icon.png" alt="Click for More Info"/></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<!-- <div class="small-12 large-3 columns">
<ul>
<li>Find a REIA</li>
<li><img src="http://placehold.it/500x250" alt="Click for More Info"/></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div> -->
<!-- <div class="small-12 large-3 columns">
</div>
<div class="small-12 large-3 columns">
<ul>
<li>Hard Money Lenders</li>
<li><img src="http://placehold.it/500x250" alt="Click for More Info"/></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-3 columns">
<ul>
<li>Real Estate Glossary</li>
<li><img src="http://placehold.it/500x250" alt="Click for More Info"/></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div> -->
</div>
</div>
</a>
</li>
<li class="has-submenu is-drilldown-submenu-parent">
<a href="#" class="dropdown" data-toggle="megamenu-property-listings">Property Listings
<div class="dropdown-pane" id="megamenu-property-listings" data-dropdown data-options="closeOnClick:true; hover: true; hoverPane: true">
<div class="row column expanded">
<div class="small-12 large-3 columns">
<ul>
<li>All Properties</li>
<li><img src="http://placehold.it/1000x250" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-4 columns">
<ul>
<li>Single Family Properties</li>
<li><img src="http://placehold.it/1000x250" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-4 columns">
<ul>
<li>Multi Family Properties</li>
<li><img src="http://placehold.it/1000x250" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
</div>
</div>
</a>
</li>
<li class="has-submenu is-drilldown-submenu-parent">
<a href="#" class="dropdown" data-toggle="megamenu-websites">Get a Website
<div class="dropdown-pane" id="megamenu-websites" data-dropdown data-options="closeOnClick:true; hover: true; hoverPane: true">
<div class="row column expanded">
<div class="small-12 large-6 columns">
<ul>
<li>Get Started</li>
<li><img src="http://placehold.it/1000x250" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
<div class="small-12 large-6 columns">
<ul>
<li>Features</li>
<li><img src="http://placehold.it/1000x250" alt="Click for More Info" /></li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam molestie ullamcorper nisl, sit amet tristique est dapibus nec.</li>
</ul>
</div>
</div>
</div>
</a>
</li>
<li>Reviews</li>
<li>Sign In</li>
</ul>
</div>
</div>
</div>
</header>
Just remove width:100%, and max-width:100%,
Instead use width:auto, and left:0px !important and all things work fine.
I'm hosting several vimeo videos in a gallery using foundation 4 framework with Reveal modal as a lightbox effect. Unfortunately the videos continue to play after each modal is closed.
I'm still new to jquery so I used the Froogaloop api (https://developer.vimeo.com/player/js-api) to unload each vimeo video but I'm unable to get it to work.
Here's my code:
//Vimeo Froogaloop API event handler
function ready(player_id) {
var player = $f(player_id),
play = document.getElementById('play'),
pause = document.getElementById('pause'),
unload = document.getElementById('unload');
play.addEventListener('click', function() {
player.api('play');
});
pause.addEventListener('click', function() {
player.api('pause');
});
unload.addEventListener('click', function() {
player.api('unload');
});
}
window.addEventListener('load', function() {
//Attach the ready event to the iframe
$f(document.getElementById('player')).addEvent('ready', ready);
});
HTML:
<!-- //Video Click Event -->
<div class="row">
<div class="large-12 columns">
<div id="myModal3" class="reveal-modal">
<iframe id="player1" src="http://player.vimeo.com/video/62831216?api=1" width="720" height="406" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<a class="close-reveal-modal" id="unload" href="#">x</a>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<p><img src="http://placehold.it/250x100" class="logo"></p>
</div>
</div>
<div class="row">
<div class="large-12 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns"> </div>
</div>
<!-- //Foundation 4 Accordion -->
<div class="row">
<div class="large-12 columns">
<div class="section-container accordion" data-section="accordion">
<section class="section">
<div class="row">
<div class="large-5 columns"><p class="title"><img src="http://placehold.it/301x248"></p></div>
<div class="large-7 columns">
<p class="title">Name<br> Title</p>
<p class="quote">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac tempus libero."</p>
</div>
</div>
<div class="row">
<div class="large-12 columns"> </div>
</div>
<div class="content">
<div class="row">
<div class="large-12 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus malesuada sapien ut nibh porttitor fringilla in sit amet risus. Curabitur euismod viverra elit sed pretium. Suspendisse laoreet tristique convallis. Aliquam erat volutpat. Morbi pharetra lobortis purus non elementum. Pellentesque mattis dignissim lectus in blandit. Duis facilisis vestibulum adipiscing. Suspendisse vulputate viverra consequat. In quis lorem ut tellus fringilla egestas. Etiam semper, dolor ut luctus dapibus, leo nunc scelerisque erat, eget aliquam dolor mauris ut risus. Nam non sem non libero laoreet bibendum quis in mi. Sed non nibh risus. Nunc id nunc felis. Maecenas eu est dui. In tortor justo, facilisis vel pulvinar a, bibendum vel tellus.</p>
</div>
</div>
<div class="row">
<div class="large-12 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns">
<a href="#" data-reveal-id="myModal3" data-animation="fadeAndPop" data-animationspeed="300" data-closeonbackgroundclick="true" data-dismissmodalclass="close-reveal-modal">
<img src="http://placehold.it/720x406">
</a>
<div class="row">
<div class="large-12 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns">
<p class="subheader"><b>Client</b><br>
<medium>"Title"</medium><br>
<small>Location</small></p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns"> </div>
</div>
</div>
</section>
</div>
</div>
</div>
Try using this
<script type="text/javascript">
jQuery(document).ready(function($) {
$('body').live('click',function(){
if($('div.reveal-modal-bg').is(':visible')){
var resourceVideo = $('#myModal iframe').attr('src');
$('#myModal iframe').attr('src','').attr('src',resourceVideo);
};
})
});
</script>
I am using foundation-3.2.2 , but I am facing image slider problem, I used both orbit image slider or content slider but its not helpful.
Problem is that on my site I want to slide both image and content at a time , and my html structure is below, you can chack ths http://ipadfeatures.info/yogita/envision.com to maximize and minimize your browser.
<div class="row">
<div class="twelve columns">
<div id="featuredContent">
<div>
<img src="images/illustration/spotlight1.jpg"/>
<div class="data">
<h3 class="textWeight">"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed"</h3>
</div>
</div>
<div>
<img src="images/illustration/spotlight2.jpg"/>
<div class="data">
<h3 class="textWeight">"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed"</h3>
Lorem ipsum dolor sit amet,
</div>
</div>
<div>
<img src="images/illustration/spotlight3.jpg"/>
<div class="data">
<h3>""Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed</h3>
Lorem ipsum dolor sit amet, c
</div>
</div>
</div>
</div>
</div>
Zurb has responded to this topic on this github page.
Unfortunately variable content sliding in Foundation 3 was not what the Orbit slider was planned for, it has been updated in Foundation 4.0 to do so, but in 3 it is not supported.