Skip to main content
staceyk6093
Known Participant
February 22, 2017
Answered

JSOR slider in off canvas toggle drawer

  • February 22, 2017
  • 2 replies
  • 497 views

I would like to use this slider: Carousel - Jssor Slider  but I would like to use in a drawer that will slide up from the bottom of my site with a button click.
Even if I could just toggle it on and off that would work!

I would appreciate any help.

Thanks!

This topic has been closed for replies.
Correct answer Jon Fritz

This can be done pretty easily using just css and a standard html checkbox/label combo.

Is this sort of what you were looking to do (copy and paste into a new document, then preview and click on the bottom bar)...

<!doctype html>

<html lang="en-us">

<head>

<title>Slide In Footer (CSS Only)</title>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<style>

* {

    -webkit-text-size-adjust:100%;

    -webkit-box-sizing:border-box;

    box-sizing:border-box;

    padding:0;

    margin:0;

}

body {

    padding-bottom:2em; /* so other content in the body tag isn't hidden by the fixed slide in drawer */

}

#slide {

    display:block;

    position:fixed;

    width:100%;

    bottom:-7.5em;

    left:0;

    min-width:500px;

    background-color:black;

    color:white;

    text-align:center;

    font-family:Tahoma, Verdana, Arial, "sans-serif";

    transition:bottom 250ms, background-color 250ms;

    cursor:pointer;

}

.info {

    display:inline-block;

    margin:4em;

}

#check:checked + #slide {

    bottom:0;

    left:0;

    background-color:#002A0C;

}

#slide:hover {

    background-color:#002A0C;

}

.contact {

    display:block;

    position:absolute;

    top:0;

    left:0;

    padding:.3em;

    font-weight:bold;

    font-size:.8em;

    color:orange;

}

.contact::after {

    content:'\25b2';

}

#check:checked + #slide .contact::after {

    content:'\25bc';

}

#check {

    display:none;

}

</style>

</head>

<body>

<input type="checkbox" id="check" name="check">

    <label id="slide" for="check">

        <span class="contact">CONTACT US </span>

        <span class="info">Your Content Here</span>

    </label>

</body>

</html>

2 replies

Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
February 24, 2017

This can be done pretty easily using just css and a standard html checkbox/label combo.

Is this sort of what you were looking to do (copy and paste into a new document, then preview and click on the bottom bar)...

<!doctype html>

<html lang="en-us">

<head>

<title>Slide In Footer (CSS Only)</title>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<style>

* {

    -webkit-text-size-adjust:100%;

    -webkit-box-sizing:border-box;

    box-sizing:border-box;

    padding:0;

    margin:0;

}

body {

    padding-bottom:2em; /* so other content in the body tag isn't hidden by the fixed slide in drawer */

}

#slide {

    display:block;

    position:fixed;

    width:100%;

    bottom:-7.5em;

    left:0;

    min-width:500px;

    background-color:black;

    color:white;

    text-align:center;

    font-family:Tahoma, Verdana, Arial, "sans-serif";

    transition:bottom 250ms, background-color 250ms;

    cursor:pointer;

}

.info {

    display:inline-block;

    margin:4em;

}

#check:checked + #slide {

    bottom:0;

    left:0;

    background-color:#002A0C;

}

#slide:hover {

    background-color:#002A0C;

}

.contact {

    display:block;

    position:absolute;

    top:0;

    left:0;

    padding:.3em;

    font-weight:bold;

    font-size:.8em;

    color:orange;

}

.contact::after {

    content:'\25b2';

}

#check:checked + #slide .contact::after {

    content:'\25bc';

}

#check {

    display:none;

}

</style>

</head>

<body>

<input type="checkbox" id="check" name="check">

    <label id="slide" for="check">

        <span class="contact">CONTACT US </span>

        <span class="info">Your Content Here</span>

    </label>

</body>

</html>

staceyk6093
Known Participant
February 28, 2017

This should work! thanks

Nancy OShea
Community Expert
Community Expert
February 23, 2017

With nothing more to go on, I'll say try Bootstrap Collapse

Nancy

Nancy O'Shea— Product User & Community Expert