The template i'm using doesn't allow scrolling on load. You can only touch scroll after you have selected a collapsed menu item. Once you scroll back to the top it "locks" again (so-to-speak).
The main area that seems to be unscrollable is a slider. Can anyone tell me what I need to do to make this site be scrollable on load?
Any information is greatly appreciated.
The site is here... http://www.slicemfg.com
<div id="home">
<div class="tp-banner-container">
<div class="tp-banner" >
<ul>
<!-- THE FIRST SLIDE -->
<li data-transition="zoomout" data-slotamount="4" data-masterspeed="700">
<img src="images/1.jpg" alt="" /> }
<!-- THE CAPTIONS IN THIS SLIDE -->
<div class="caption big-text lft"
data-x="center"
data-y="350"
width="10px"
data-speed="700"
data-start="700"
data-easing="easeOutExpo">
<div class="big-text"><span4>YOUR IDEAS REALIZED</span4></br><div><a class="button3 scroll" href="#contact">CONTACT US</a></div></div>
</div>
</li>
<li data-transition="zoomout" data-slotamount="1" data-masterspeed="700">
<img src="images/14.jpg" alt="" />
<div class="just_pattern"></div>
<div class="caption big-text lft"
data-x="center"
data-y="center"
data-speed="700"
data-start="700"
data-easing="easeOutExpo"><div class="big-text"><span4>YOUR IDEAS REALIZED</span4></br><div><a class="button3 scroll" href="#contact">CONTACT US</a></div></div>
</div>
</li>
<li data-transition="zoomout" data-slotamount="1" data-masterspeed="700">
<img src="images/07.jpg" alt="" />
<div class="just_pattern"></div>
<div class="caption big-text lft"
data-x="center"
data-y="center"
data-speed="700"
data-start="700"
data-easing="easeOutExpo"><div class="big-text"><span4>YOUR IDEAS REALIZED</span4></br><div><a class="button3 scroll" href="#contact">CONTACT US</a></div></div>
</div>
</li>
<li data-transition="zoomout" data-slotamount="1" data-masterspeed="700">
<img src="images/04.jpg" alt="" />
<div class="just_pattern"></div>
<div class="caption big-text lft"
data-x="center"
data-y="center"
data-speed="500"
data-start="500"
data-easing="easeOutExpo"><div class="big-text"><span4>YOUR IDEAS REALIZED</span4></br><div><a class="button3 scroll" href="#contact">CONTACT US</a></div></div>
</div>
</li>
</ul>
</div>
</div>
</div>
To fix this issue, you need to add touchenabled:"off", to your revolution config.
Your config should now look like this:
(function($) { "use strict";
var revapi;
jQuery(document).ready(function() {
revapi = jQuery('.tp-banner').revolution(
{
delay:5000,
startwidth:2000,
startheight:500,
soloArrowRightVOffset:50,
soloArrowLeftVOffset:50,
hideThumbs:0,
onHoverStop:"off",
navigationType: "none",
fullWidth:"off",
fullScreen:"on",
fullScreenOffsetContainer: "",
touchenabled:"off" //Disable touch events.
});
}); //ready
})(jQuery);
Related
I am trying to implement a navbar for my application whose front end is built using Vue 2.0 and Bulma . It works well on desktops and but on smaller screens its showing the burger icon but it is not showing any elements. Its just present.
<template>
<div class="container is-fluid">
<div>
<nav class="navbar is-dark">
<div class="navbar-brand">
<a class="navbar-item" href="#">
<img alt="K R O N O S" height="100px">
</a>
<div class="button navbar-burger" data-target="navMenu">
<span></span>
<span></span>
<span></span>
</div>
</div>
<div class="navbar-menu" id="navMenu">
<div class="navbar-end">
<div class="navbar-item">
<a class="" href="#"> Docs </a>
</div>
<div class="navbar-item ">
<a class="" href="#"> Report </a>
</div>
<div class="navbar-item">
<a class="">More</a>
</div>
<div class="navbar-item">
<a class="">Logout</a>
</div>
</div>
</div>
</nav>
</div>
</div>
</template>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Get all "navbar-burger" elements
var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0)
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(function ($el) {
$el.addEventListener('click', function () {
// Get the target from the "data-target" attribute
var target = $el.dataset.target
var $target = document.getElementById(target)
// Toggle the class on both the "navbar-burger" and the "navbar-menu"
$el.classList.toggle('is-active')
$target.classList.toggle('is-active')
})
})
}
})
export default {
name: 'Navbar',
data () {
return {
msg: ''
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
div{
border: 0px solid black;
}
</style>
As you can see I have tried implementing the example code in on which was present here but with no use. Shouldnt Bulma give me responsive navbar out of the box. All the examples and solutions I have found are for the older "nav" class not the newer "navbar". Help would be much appreciated.
So, after a bit of studying the Vue guide and clues from fatman's comments, this is the fix I applied.
The above code works , but this is a more vue-ish way to do the navbar-burger menu.
<template>
<nav class="navbar">
<div class="container">
<div class="navbar-brand is-large">
<a class="navbar-item" href="#">
<img alt="K R O N O S" height="100px">
</a>
<button #click="makeBurger" class="button navbar-burger" data-target="navMenu" v-bind:class="{ 'is-active': activator }">
<span></span>
<span></span>
<span></span>
</button>
</div>
<div class="navbar-menu" id="navMenu" v-bind:class="{ 'is-active': activator }">
<div class="navbar-end">
<div class="navbar-item">
<a class="" href="#"> Docs </a>
</div>
<div class="navbar-item ">
<a class="" href="#"> Report </a>
</div>
<div class="navbar-item">
<a class="">More</a>
</div>
<div class="navbar-item">
<a class="">Logout</a>
</div>
</div>
</div>
</div>
</nav>
</template>
<script>
export default {
name: 'Navbar',
data () {
return {
msg: '',
activator: false
}
},
methods: {
makeBurger () {
this.activator = !this.activator
return this.activator
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
div{
border: 0px solid black;
}
</style>
Hope this helps someone. The show/hide functionality is taken care by Bulma.
This works, but
will not close the menu
will cause router-links not to work
For 1.) I recommend adding #click to navbar-item as well:
<a #click="makeBurger" class="navbar-item">
<router-link to="/login">
{{link1}}
</router-link>
</a>
I am working on a project with Meteor JS (version 1.2) using the accounts-password package for user sign up / sign in.
I am using - or at least try to use - Zurb Foundation 5 (version 5.3) for my projekt. I tested the ewall:foundation package and the juliancwirko:zf5 package and both works well.
For accounts i added the useraccounts:foundation package.
Using the {{> atForm}} tamplate on a page works also well. The SignIn/SignUp Form displays correctly.
But using it in a fixed top NavBar does not work. It displays it not correctly. (See pictures and source below.)
I am getting NO errors in the console that something is not loading correctly.
I assume the useraccounts:foundation package to display a button/link in the navbar and then show a modal/popup with the login form.
My Question: Is any of the packages broken or am I using them wrong in any way?
Or is my assumption, that the useraccounts:foundation package should display the signin form in a nav bar with a modal, just wrong? If so, what do I need to do to get that desired behavior in my app?
The App displays the signin form in the page correctly, but in the navbar wrong.
In the mobile view ...
... it displays also not correctly.
I made a simple projekt without any router etc to test just the above packages, here is the source:
project/client/main.html
<head>
<title>ZF5 Demo</title>
</head>
<body>
{{> header}}
{{> content}}
</body>
project/client/header.html
<template name="header">
<nav class="top-bar" data-topbar="">
<ul class="title-area">
<li class="name">
<h1>ZF5 Demo</h1>
</li>
<li class="toggle-topbar menu-icon"><span>menu</span></li>
</ul>
<section style="left: 0%;" class="top-bar-section">
<ul class="right">
<li>Home</li>
<li>{{> atForm}}</li>
</ul>
</section>
</nav>
</template>
project/client/header.js
Template.header.rendered = function () {
$(document).foundation('reflow');
}
project/client/content.js
<template name="content">
<section class="row">
<div class="large-12 columns">
<div class="panel">
<h1>Content</h1>
{{> atForm}}
</div>
</div>
</section>
</template>
The rendered HTML looks like that (only the navbar part).
<body>
<nav data-topbar="" class="top-bar">
<ul class="title-area">
<li class="name">
<h1>ZF5 Demo</h1>
</li>
<li class="toggle-topbar menu-icon"><span>menu</span></li>
</ul>
<section class="top-bar-section" style="left: 0%;">
<ul class="right">
<li>Home</li>
<li>
<div class="at-form">
<div class="at-title">
<h3>Sign In</h3>
</div>
<div class="at-pwd-form">
<form method="POST" action="#" novalidate="" id="at-pwd-form" role="form">
<div class="at-input row">
<div class="large-12 columns">
<label for="at-field-email">
Email
</label>
<input aria-label="Email " placeholder="Email" name="at-field-email" id="at-field-email" type="email">
</div>
</div>
<div class="at-input row">
<div class="large-12 columns">
<label for="at-field-password">
Password
</label>
<input aria-label="Password " placeholder="Password" name="at-field-password" id="at-field-password" type="password">
</div>
</div>
<button id="at-btn" class="at-btn button" type="submit">
Sign In
</button>
</form>
</div>
<div class="at-signup-link">
<p>
Don't have an account?
<a class="at-link at-signup" id="at-signUp" href="#">Register</a>
</p>
</div>
</div>
</li>
</ul>
</section></nav>
[...content...]</body>
EDIT
I tried to wrap the {{> atForm}} template into a dropdown in project/client/header.html:
<template name="header">
<nav class="top-bar" data-topbar="">
<ul class="title-area">
<li class="name">
<h1>ZF5 Demo</h1>
</li>
<li class="toggle-topbar menu-icon"><span>menu</span></li>
</ul>
<section style="left: 0%;" class="top-bar-section">
<ul class="right">
<li>Home</li>
<li>
<a data-dropdown="signin-dropdown" aria-controls="signin-dropdown" aria-expanded="false">Sign In</a>
<div id="signin-dropdown" data-dropdown-content class="f-dropdown content" aria-hidden="true">
<div>
{{> atForm}}
</div>
</div>
</li>
</ul>
</section>
</nav>
</template>
The result looks like this:
Now the Menu Button looks better, ...
... but the LogIn Form is rendered incorrect.
I also tried out several other things and nothing worked out.
I think this is a problem only with the way I use foundation, because I am new to that framework and don't understand every detail.
So I will stick with the SignIn Modal Form like shown in that example.
I'm trying to give a different background-color to my button when it is active. The HTML code is as below.
<div class="tabs">
<div class="tab-content">
<div id="tab1" class="tab active">
<!-- some content -->
</div>
<div id="tab2" class="tab">
<!-- some content -->
</div>
<div id="tab3" class="tab">
<!-- some content -->
</div>
<ul class="tab-links">
<li class="active">
<a href="#tab1"><span class="numer_viti">bla bla</span>
<p class="arrow-up"><p class="cmimet_ne_vite">BUTTON ACTIVE</p></p></a>
</li>
<li>
<a href="#tab2"><span class="numer_viti">bla bla</span>
<p class="arrow-up"><p class="cmimet_ne_vite">BUTTON</p></p></a>
</li>
<li>
<a href="#tab3"><span class="numer_viti">bla bla</span>
<p class="arrow-up"><p class="cmimet_ne_vite">BUTTON</p></p></a>
</li>
</ul>
</div>
</div>
I used both this codes in my CSS files and i didn't sow nothing happened:
This is the CSS code for my project:
.cmimet_ne_vite:active
{
background:#787878;
}
.cmimet_ne_vite.active
{
background:#787878;
}
So who knows were is the problem to help me resolve it?
You have no element with both classes "cmimet_ne_vite" and "active". Instead you have a .cmimet_ne_vite element which is a descendant of your .active element, so instead of .cmimet_ne_vite.active you'll need to use:
.active .cmimet_ne_vite {
background:#787878;
}
Furthermore, you cannot wrap two <p> elements within each other. The browser will render this as two separate elements. Change:
<p class="arrow-up">
<p class="cmimet_ne_vite">BUTTON</p>
</p>
To:
<p class="arrow-up">
<span class="cmimet_ne_vite">BUTTON</span>
</p>
Or something similar.
Finally, if this element is intended to be used as a button you'll need to give it a role attribute set to "button":
<span class="cmimet_ne_vite" role="button">BUTTON</span>
Im trying to show non-sibling/immediate div in 3 layers dropdown menu.
Browse Ads - Jobs - XZY
Browse Ads
<div class="sub-nav-container" >
<div class="layout-container">
<div class="sub-navs">
<p class="sub-nav-title">Ads Category</p>
<a id="sub-nav-job" href> Jobs Available</a>
<a id="sub-nav-services" href>Services</a>
</div>
<div class="sub-navs">
<p class="sub-nav-title">Favourites</p>
<div id="sub-nav-job-sub" class="sub-nav-sub">
<a href>IT</a>
<a href>office</a>
</div>
<div id="sub-nav-real-estate-sub" class="sub-nav-sub">
<a href>Rent Apartment</a>
<a href>Buy House</a>
</div>
</div>
</div>
</div>
#site-navigation .sub-navs .sub-nav-sub {visibility:hidden}
#site-navigation a#sub-nav-job:hover > #sub-nav-job-sub { visibility: visible}
But Im not getting the result.
TIA for the effort.
I have been struggling with a problem for a while now. I've made a simple html gallery using CSS and a # href to essentially swap out different div ID's containing gallery images. The problem is that when you select the "next" or "previous" buttons in the gallery it jumps the page up in the browser so the gallery is aligned at the top of the page. Does anybody have any ideas how to prevent this?
Here is what the code for the gallery looks like:
<div id="pic1">
<img src="click/pic1.jpg" alt="" />
<a class="previous" href="#pic10"><b>Previous</b></a><a class="next" href="#pic2"><b>Next</b></a>
</div>
<div id="pic2">
<img src="click/pic2.jpg" alt="" />
<a class="previous" href="#pic1"><b>Previous</b></a><a class="next" href="#pic3"> <b>Next</b></a>
</div>
<div id="pic3">
<img src="click/pic3.jpg" alt="" />
<a class="previous" href="#pic2"><b>Previous</b></a><a class="next" href="#pic4"><b>Next</b></a>
</div>
<div id="pic4">
<img src="click/pic4.jpg" alt="" />
<a class="previous" href="#pic3"><b>Previous</b></a><a class="next" href="#pic5"> <b>Next</b></a>
</div>
<div id="pic5">
<img src="click/pic5.jpg" alt="" />
<a class="previous" href="#pic4"><b>Previous</b></a><a class="next" href="#pic6"><b>Next</b></a>
</div>
<div id="pic6">
<img src="click/pic6.jpg" alt="" />
<a class="previous" href="#pic5"><b>Previous</b></a><a class="next" href="#pic7"><b>Next</b></a>
</div>
<div id="pic7">
<img src="click/pic7.jpg" alt="" />
<a class="previous" href="#pic6"><b>Previous</b></a><a class="next" href="#pic8"><b>Next</b></a>
</div>
<div id="pic8">
<img src="click/pic8.jpg" alt="" />
<a class="previous" href="#pic7"><b>Previous</b></a><a class="next" href="#pic9"><b>Next</b></a>
</div>
<div id="pic9">
<img src="click/pic9.jpg" alt="" />
<a class="previous" href="#pic8"><b>Previous</b></a><a class="next" href="#pic10"><b>Next</b></a>
</div>
<div id="pic10">
<img src="click/pic10.jpg" alt="" />
<a class="previous" href="#pic9"><b>Previous</b></a><a class="next" href="#pic1"> <b>Next</b></a>
</div>
Any help would be greatly appreciated!
Instead of linking to #, link to javascript:void(0);
<a class="previous" href="javascript:void(0);">Next</a>
Or, prevent the default event with Javascript
$("a.previous, a.next").on("click", function(e) {
e.preventDefault();
});
You will need to use JQuery after you set
<a class="previous" href="javascript:void(0);">Next</a>
then call the JS:
$(document).ready(function(){
$('a.previous').click(function(e){
var picID= parseInt($(this).parent().attr("id").substr(3));//gets the pic id count
$("#pic"+(picID)).hide(); //hide the current div
$("#pic"+(picID-1)).show(); //show the previous div
});
$('a.next').click(function(e){
var picID= parseInt($(this).parent().attr("id").substr(3)); //gets the pic id count
$("#pic"+(picID)).hide(); //hide the current div
$("#pic"+(picID+1)).show(); //show the previous div
});
});
see: http://jsfiddle.net/uZ6g5/