javascript - how to slide element using bootstrap 3 grid system -


I am trying to apply the sliding menu I'm using the Bootstrap 3 Grid system. How can I move elements aside from one side of the bootstrap's grid system? Without the grid system, I will just fulfill the status of my element and then the left property will be shown as shown, but I think that this solution will be wrong, any help?

HTML:

  & lt; Button id = "click" & gt; Click me & lt; / Button & gt; & Lt; Div & gt; Hello Plunker! & Lt; / Div & gt;  

CSS:

  div {width: 200px; Height: 100 pixels; Background color: green; Status: Completed; Left: 0; Correct: auto; Infection: all 0.5 linear; } Div.left {left: 0; } Div.left {left: 200px; }  

JS:

  var el = document.getElementById ('clickMe') el.addEventListener ('click', function (e) {Var element = document.query Selector ('div'); if (element.classList.contains ('left') {element.classList.remove ('left'); element.classList.add ('right');} Other {Element.classList.remove ('right'); element.classList.add ('left');}})  


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -