Skip to main content

Jquery Sliding

jQuery Sliding Methods:- 

With jQuery you can create a sliding effect on elements.

jQuery has the following slide methods:

slideDown()
slideUp()
slideToggle()



(1)slideDown()  example:-


<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#flip").click(function(){
    $("#panel").slideDown("slow");
  });
});
</script>
<style>
#panel, #flip {
  padding: 5px;
  text-align: center;
  background-color: #e5eecc;
  border: solid 1px #c3c3c3;
}

#panel {
  padding: 50px;
  display: none;
}
</style>
</head>
<body>

<div id="flip">Click to slide down panel</div>
<div id="panel">Hello world!</div>

</body>
</html>

(2)sldeUP()  example:-

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script> 
$(document).ready(function(){
  $("#flip").click(function(){
    $("#panel").slideUp("slow");
  });
});
</script>
<style> 
#panel, #flip {
  padding: 5px;
  text-align: center;
  background-color: #e5eecc;
  border: solid 1px #c3c3c3;
}

#panel {
  padding: 50px;
}
</style>
</head>
<body>
<div id="flip">Click to slide up panel</div>
<div id="panel">Hello world!</div>

</body>
</html>


(3)SlideToggle()  example:-


<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#flip").click(function(){
    $("#panel").slideToggle("slow");
  });
});
</script>
<style>
#panel, #flip {
  padding: 5px;
  text-align: center;
  background-color: #e5eecc;
  border: solid 1px #c3c3c3;
}

#panel {
  padding: 50px;
  display: none;
}
</style>
</head>
<body>

<div id="flip">Click to slide down panel</div>
<div id="panel">Hello world!</div>

</body>
</html>

Comments


  1. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete

  2. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  3. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  4. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  5. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  6. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  7. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  8. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  9. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  10. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete
  11. We Make Strategies, Searching for Websites Development To Create Valuable Websites and Products With Unique Business Ideas and The Passionate People Behind.

    ReplyDelete

Post a Comment

Popular posts from this blog

Juqery Event

(1)Click Event example:- ​<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){   $("p").click(function(){     alert("The paragraph was clicked.");   }); }); </script> </head> <body> <p>Click on this paragraph.</p> </body> </html> (2)Mouseenter  Event Example  :- <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){   $("p").mouseenter(function(){     $("p").css("background-color", "yellow");   });   $("p").mouseleave(function(){     $("p").css("background-color", "lightgray");   }); }); </script> </head> <body> <p>Move the mouse po...

Juqery stop

jQuery stop() Method:- The jQuery stop() method is used to stop an animation or effect before it is finished. The stop() method works for all jQuery effect functions, including sliding, fading and custom animations. Syntax: $(selector).stop(stopAll,goToEnd); <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){   $("#flip").click(function(){     $("#panel").slideDown(5000);   });   $("#stop").click(function(){     $("#panel").stop();   }); }); </script> <style> #panel, #flip {   padding: 5px;   font-size: 18px;   text-align: center;   background-color: #555;   color: white;   border: solid 1px #666;   border-radius: 3px; } #panel {   padding: 50px;   display: none; } </style> </head> <body> <button id="stop">S...

XSLT QUICK GUIDE

E X tensible  S tylesheet  L anguage  T ransformation commonly known as XSLT is a way to transform the XML document into other formats such as XHTML. XSL Before learning XSLT, we should first understand XSL which stands for E X tensible  S tylesheet  L anguage. It is similar to XML as CSS is to HTML. Need for XSL In case of HTML document, tags are predefined such as table, div, and span; and the browser knows how to add style to them and display those using CSS styles. But in case of XML documents, tags are not predefined. In order to understand and style an XML document, World Wide Web Consortium (W3C) developed XSL which can act as XML based Stylesheet Language. An XSL document specifies how a browser should render an XML document. Following are the main parts of XSL − ·          XSLT  − used to transform XML document into various other types of document. ·       ...