Swipe effect in web page menu
Hi I am trying to implement swipe effect in my web page. When user swipe circle icon then highlight current menu with big circle.
Following are my code. Actually i have tried with owlCarousel jquery.
I have take reference from stackoverflow link
I need this type of output
var $owl = $('#owl-one');
$owl.children().each( function( index ) {
$(this).attr( 'data-position', index );
});
$owl.owlCarousel({
center: true,
loop: true,
items: 10
});
$(document).on('click', '.owl-item>div', function(event) {
$owl.trigger('to.owl.carousel', $(this).data( 'position' ) );
});
.footer-menu {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #334451;
height: 57px;
padding: 10px 0;
z-index: 100;
}
.footer-menu .owl-carousel {
max-width: 765px;
margin: 0 auto;
width: 100%;
}
.footer-menu .menu-item {
background: #587489;
color: #fff;
text-align: center;
font-family: 'ClearSans-Bold';
font-size: 18px;
height: 35px;
width: 35px;
line-height: 20px;
padding: 5px;
text-indent: -9999px;
border-radius: 50%;
}
.menu-item .btn {
padding: 0 !important;
}
.footer-menu .owl-item {
}
.menu-item .btn:hover, .menu-item .btn:active, .menu-item .btn:focus {
box-shadow: none;
}
.footer-menu .owl-item.active .menu-item {
border-radius: 50%;
width: 35px;
height: 35px;
margin: 0 auto;
}
.footer-menu .owl-item.active.center {
width: 110px !important;
}
.footer-menu .owl-item.active.center .menu-item {
border-radius: 30px;
text-indent: 0;
width: 110px !important;
}
.footer-menu .owl-item>div {
cursor: pointer;
transition: margin 0.4s ease;
}
.footer-menu .owl-item.center>div {
cursor: auto;
margin: 0;
}
.footer-menu .owl-item:not(.center)>div:hover {
opacity: .75;
}
<div class="footer-menu">
<div class="owl-carousel" id="owl-one">
<div class="menu-item" title="what if?"><a class="btn links">what if?</a></div>
<div class="menu-item" title="info"><a class="btn links">info</a></div>
<div class="menu-item" title="how to"><a class="btn links" >how to</a></div>
<div class="menu-item" title="true story"><a class="btn links">true story</a></div>
<div class="menu-item" title="model"><a class="btn links" >model</a></div>
<div class="menu-item" title="brain"><a class="btn links">brain</a></div>
<div class="menu-item" title="apply it"><a class="btn links">apply it</a></div>
<div class="menu-item" title="profile"><a class="btn links">profile</a></div>
<div class="menu-item" title="got it 1"><a class="btn links" >got it 1</a></div>
<div class="menu-item" title="got it 2"><a class="btn links">got it 2</a></div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/owl.carousel.min.js"></script>
I Have get this type of current output
javascript jquery html css bootstrap-4
add a comment |
Hi I am trying to implement swipe effect in my web page. When user swipe circle icon then highlight current menu with big circle.
Following are my code. Actually i have tried with owlCarousel jquery.
I have take reference from stackoverflow link
I need this type of output
var $owl = $('#owl-one');
$owl.children().each( function( index ) {
$(this).attr( 'data-position', index );
});
$owl.owlCarousel({
center: true,
loop: true,
items: 10
});
$(document).on('click', '.owl-item>div', function(event) {
$owl.trigger('to.owl.carousel', $(this).data( 'position' ) );
});
.footer-menu {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #334451;
height: 57px;
padding: 10px 0;
z-index: 100;
}
.footer-menu .owl-carousel {
max-width: 765px;
margin: 0 auto;
width: 100%;
}
.footer-menu .menu-item {
background: #587489;
color: #fff;
text-align: center;
font-family: 'ClearSans-Bold';
font-size: 18px;
height: 35px;
width: 35px;
line-height: 20px;
padding: 5px;
text-indent: -9999px;
border-radius: 50%;
}
.menu-item .btn {
padding: 0 !important;
}
.footer-menu .owl-item {
}
.menu-item .btn:hover, .menu-item .btn:active, .menu-item .btn:focus {
box-shadow: none;
}
.footer-menu .owl-item.active .menu-item {
border-radius: 50%;
width: 35px;
height: 35px;
margin: 0 auto;
}
.footer-menu .owl-item.active.center {
width: 110px !important;
}
.footer-menu .owl-item.active.center .menu-item {
border-radius: 30px;
text-indent: 0;
width: 110px !important;
}
.footer-menu .owl-item>div {
cursor: pointer;
transition: margin 0.4s ease;
}
.footer-menu .owl-item.center>div {
cursor: auto;
margin: 0;
}
.footer-menu .owl-item:not(.center)>div:hover {
opacity: .75;
}
<div class="footer-menu">
<div class="owl-carousel" id="owl-one">
<div class="menu-item" title="what if?"><a class="btn links">what if?</a></div>
<div class="menu-item" title="info"><a class="btn links">info</a></div>
<div class="menu-item" title="how to"><a class="btn links" >how to</a></div>
<div class="menu-item" title="true story"><a class="btn links">true story</a></div>
<div class="menu-item" title="model"><a class="btn links" >model</a></div>
<div class="menu-item" title="brain"><a class="btn links">brain</a></div>
<div class="menu-item" title="apply it"><a class="btn links">apply it</a></div>
<div class="menu-item" title="profile"><a class="btn links">profile</a></div>
<div class="menu-item" title="got it 1"><a class="btn links" >got it 1</a></div>
<div class="menu-item" title="got it 2"><a class="btn links">got it 2</a></div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/owl.carousel.min.js"></script>
I Have get this type of current output
javascript jquery html css bootstrap-4
add a comment |
Hi I am trying to implement swipe effect in my web page. When user swipe circle icon then highlight current menu with big circle.
Following are my code. Actually i have tried with owlCarousel jquery.
I have take reference from stackoverflow link
I need this type of output
var $owl = $('#owl-one');
$owl.children().each( function( index ) {
$(this).attr( 'data-position', index );
});
$owl.owlCarousel({
center: true,
loop: true,
items: 10
});
$(document).on('click', '.owl-item>div', function(event) {
$owl.trigger('to.owl.carousel', $(this).data( 'position' ) );
});
.footer-menu {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #334451;
height: 57px;
padding: 10px 0;
z-index: 100;
}
.footer-menu .owl-carousel {
max-width: 765px;
margin: 0 auto;
width: 100%;
}
.footer-menu .menu-item {
background: #587489;
color: #fff;
text-align: center;
font-family: 'ClearSans-Bold';
font-size: 18px;
height: 35px;
width: 35px;
line-height: 20px;
padding: 5px;
text-indent: -9999px;
border-radius: 50%;
}
.menu-item .btn {
padding: 0 !important;
}
.footer-menu .owl-item {
}
.menu-item .btn:hover, .menu-item .btn:active, .menu-item .btn:focus {
box-shadow: none;
}
.footer-menu .owl-item.active .menu-item {
border-radius: 50%;
width: 35px;
height: 35px;
margin: 0 auto;
}
.footer-menu .owl-item.active.center {
width: 110px !important;
}
.footer-menu .owl-item.active.center .menu-item {
border-radius: 30px;
text-indent: 0;
width: 110px !important;
}
.footer-menu .owl-item>div {
cursor: pointer;
transition: margin 0.4s ease;
}
.footer-menu .owl-item.center>div {
cursor: auto;
margin: 0;
}
.footer-menu .owl-item:not(.center)>div:hover {
opacity: .75;
}
<div class="footer-menu">
<div class="owl-carousel" id="owl-one">
<div class="menu-item" title="what if?"><a class="btn links">what if?</a></div>
<div class="menu-item" title="info"><a class="btn links">info</a></div>
<div class="menu-item" title="how to"><a class="btn links" >how to</a></div>
<div class="menu-item" title="true story"><a class="btn links">true story</a></div>
<div class="menu-item" title="model"><a class="btn links" >model</a></div>
<div class="menu-item" title="brain"><a class="btn links">brain</a></div>
<div class="menu-item" title="apply it"><a class="btn links">apply it</a></div>
<div class="menu-item" title="profile"><a class="btn links">profile</a></div>
<div class="menu-item" title="got it 1"><a class="btn links" >got it 1</a></div>
<div class="menu-item" title="got it 2"><a class="btn links">got it 2</a></div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/owl.carousel.min.js"></script>
I Have get this type of current output
javascript jquery html css bootstrap-4
Hi I am trying to implement swipe effect in my web page. When user swipe circle icon then highlight current menu with big circle.
Following are my code. Actually i have tried with owlCarousel jquery.
I have take reference from stackoverflow link
I need this type of output
var $owl = $('#owl-one');
$owl.children().each( function( index ) {
$(this).attr( 'data-position', index );
});
$owl.owlCarousel({
center: true,
loop: true,
items: 10
});
$(document).on('click', '.owl-item>div', function(event) {
$owl.trigger('to.owl.carousel', $(this).data( 'position' ) );
});
.footer-menu {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #334451;
height: 57px;
padding: 10px 0;
z-index: 100;
}
.footer-menu .owl-carousel {
max-width: 765px;
margin: 0 auto;
width: 100%;
}
.footer-menu .menu-item {
background: #587489;
color: #fff;
text-align: center;
font-family: 'ClearSans-Bold';
font-size: 18px;
height: 35px;
width: 35px;
line-height: 20px;
padding: 5px;
text-indent: -9999px;
border-radius: 50%;
}
.menu-item .btn {
padding: 0 !important;
}
.footer-menu .owl-item {
}
.menu-item .btn:hover, .menu-item .btn:active, .menu-item .btn:focus {
box-shadow: none;
}
.footer-menu .owl-item.active .menu-item {
border-radius: 50%;
width: 35px;
height: 35px;
margin: 0 auto;
}
.footer-menu .owl-item.active.center {
width: 110px !important;
}
.footer-menu .owl-item.active.center .menu-item {
border-radius: 30px;
text-indent: 0;
width: 110px !important;
}
.footer-menu .owl-item>div {
cursor: pointer;
transition: margin 0.4s ease;
}
.footer-menu .owl-item.center>div {
cursor: auto;
margin: 0;
}
.footer-menu .owl-item:not(.center)>div:hover {
opacity: .75;
}
<div class="footer-menu">
<div class="owl-carousel" id="owl-one">
<div class="menu-item" title="what if?"><a class="btn links">what if?</a></div>
<div class="menu-item" title="info"><a class="btn links">info</a></div>
<div class="menu-item" title="how to"><a class="btn links" >how to</a></div>
<div class="menu-item" title="true story"><a class="btn links">true story</a></div>
<div class="menu-item" title="model"><a class="btn links" >model</a></div>
<div class="menu-item" title="brain"><a class="btn links">brain</a></div>
<div class="menu-item" title="apply it"><a class="btn links">apply it</a></div>
<div class="menu-item" title="profile"><a class="btn links">profile</a></div>
<div class="menu-item" title="got it 1"><a class="btn links" >got it 1</a></div>
<div class="menu-item" title="got it 2"><a class="btn links">got it 2</a></div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/owl.carousel.min.js"></script>
I Have get this type of current output
var $owl = $('#owl-one');
$owl.children().each( function( index ) {
$(this).attr( 'data-position', index );
});
$owl.owlCarousel({
center: true,
loop: true,
items: 10
});
$(document).on('click', '.owl-item>div', function(event) {
$owl.trigger('to.owl.carousel', $(this).data( 'position' ) );
});
.footer-menu {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #334451;
height: 57px;
padding: 10px 0;
z-index: 100;
}
.footer-menu .owl-carousel {
max-width: 765px;
margin: 0 auto;
width: 100%;
}
.footer-menu .menu-item {
background: #587489;
color: #fff;
text-align: center;
font-family: 'ClearSans-Bold';
font-size: 18px;
height: 35px;
width: 35px;
line-height: 20px;
padding: 5px;
text-indent: -9999px;
border-radius: 50%;
}
.menu-item .btn {
padding: 0 !important;
}
.footer-menu .owl-item {
}
.menu-item .btn:hover, .menu-item .btn:active, .menu-item .btn:focus {
box-shadow: none;
}
.footer-menu .owl-item.active .menu-item {
border-radius: 50%;
width: 35px;
height: 35px;
margin: 0 auto;
}
.footer-menu .owl-item.active.center {
width: 110px !important;
}
.footer-menu .owl-item.active.center .menu-item {
border-radius: 30px;
text-indent: 0;
width: 110px !important;
}
.footer-menu .owl-item>div {
cursor: pointer;
transition: margin 0.4s ease;
}
.footer-menu .owl-item.center>div {
cursor: auto;
margin: 0;
}
.footer-menu .owl-item:not(.center)>div:hover {
opacity: .75;
}
<div class="footer-menu">
<div class="owl-carousel" id="owl-one">
<div class="menu-item" title="what if?"><a class="btn links">what if?</a></div>
<div class="menu-item" title="info"><a class="btn links">info</a></div>
<div class="menu-item" title="how to"><a class="btn links" >how to</a></div>
<div class="menu-item" title="true story"><a class="btn links">true story</a></div>
<div class="menu-item" title="model"><a class="btn links" >model</a></div>
<div class="menu-item" title="brain"><a class="btn links">brain</a></div>
<div class="menu-item" title="apply it"><a class="btn links">apply it</a></div>
<div class="menu-item" title="profile"><a class="btn links">profile</a></div>
<div class="menu-item" title="got it 1"><a class="btn links" >got it 1</a></div>
<div class="menu-item" title="got it 2"><a class="btn links">got it 2</a></div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/owl.carousel.min.js"></script>
var $owl = $('#owl-one');
$owl.children().each( function( index ) {
$(this).attr( 'data-position', index );
});
$owl.owlCarousel({
center: true,
loop: true,
items: 10
});
$(document).on('click', '.owl-item>div', function(event) {
$owl.trigger('to.owl.carousel', $(this).data( 'position' ) );
});
.footer-menu {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #334451;
height: 57px;
padding: 10px 0;
z-index: 100;
}
.footer-menu .owl-carousel {
max-width: 765px;
margin: 0 auto;
width: 100%;
}
.footer-menu .menu-item {
background: #587489;
color: #fff;
text-align: center;
font-family: 'ClearSans-Bold';
font-size: 18px;
height: 35px;
width: 35px;
line-height: 20px;
padding: 5px;
text-indent: -9999px;
border-radius: 50%;
}
.menu-item .btn {
padding: 0 !important;
}
.footer-menu .owl-item {
}
.menu-item .btn:hover, .menu-item .btn:active, .menu-item .btn:focus {
box-shadow: none;
}
.footer-menu .owl-item.active .menu-item {
border-radius: 50%;
width: 35px;
height: 35px;
margin: 0 auto;
}
.footer-menu .owl-item.active.center {
width: 110px !important;
}
.footer-menu .owl-item.active.center .menu-item {
border-radius: 30px;
text-indent: 0;
width: 110px !important;
}
.footer-menu .owl-item>div {
cursor: pointer;
transition: margin 0.4s ease;
}
.footer-menu .owl-item.center>div {
cursor: auto;
margin: 0;
}
.footer-menu .owl-item:not(.center)>div:hover {
opacity: .75;
}
<div class="footer-menu">
<div class="owl-carousel" id="owl-one">
<div class="menu-item" title="what if?"><a class="btn links">what if?</a></div>
<div class="menu-item" title="info"><a class="btn links">info</a></div>
<div class="menu-item" title="how to"><a class="btn links" >how to</a></div>
<div class="menu-item" title="true story"><a class="btn links">true story</a></div>
<div class="menu-item" title="model"><a class="btn links" >model</a></div>
<div class="menu-item" title="brain"><a class="btn links">brain</a></div>
<div class="menu-item" title="apply it"><a class="btn links">apply it</a></div>
<div class="menu-item" title="profile"><a class="btn links">profile</a></div>
<div class="menu-item" title="got it 1"><a class="btn links" >got it 1</a></div>
<div class="menu-item" title="got it 2"><a class="btn links">got it 2</a></div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/owl.carousel.min.js"></script>
javascript jquery html css bootstrap-4
javascript jquery html css bootstrap-4
edited Nov 14 '18 at 11:13
Abhijit
asked Nov 14 '18 at 10:56
AbhijitAbhijit
1,002715
1,002715
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298567%2fswipe-effect-in-web-page-menu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298567%2fswipe-effect-in-web-page-menu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown