Skip to main content

Drop-down menu sliding top to down using JQuery java script language

Drop-down menu sliding top to down using  JQuery java script language 

In this tutorial we will see how to make a drop down menu maybe you are thinking what is different in this drop down  menu, so friend in this drop down list , you can not make drop-down list  using only javascript , so in this case we need javascript ,s library called JQuery ,


dear ,on this website you will get all type web developing  source code ,please don't
forget to share of this website link among your friends and relatives ,
and follow of this website for latest and amazing  source code

let s break of  this topic 

1. first you need to paste of this JQuery  CDN in head tag  like this 

   <script src="https://kit.fontawesome.com/a076d05399.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
   


2. And in script tag we will writing 

  <script>
        $(document).ready(function() {
            $("#icon ").click(function() {
                $("#panel").slideToggle("slow");


            });
        });
    </script>

here in second line icon is  id of a tag if any visiter will click on it then next function will work
here next function is     $("#panel /* here those id, class ,tag which you want or sliding ").slideToggle("slow");.slideToggle("")  in this breacked you can choose any value like fast or slow an 
you can also provide time 


please see of this video on full resolution 



you can use of this source code through copy paste:
<!DOCTYPE html>
<html>

<head>
    <script src="https://kit.fontawesome.com/a076d05399.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script>
        $(document).ready(function() {
            $("#icon").click(function() {
                $("#panel").slideToggle("slow");


            });
        });
    </script>

    <style>
        * {
            margin0;
            padding0;
            box-sizingborder-box;
        }
        
        body {
/*change of your background-image because it will not show in your browser */
            background-imageurl("code_letters_screen_137590_1280x720.jpg");
            height100vh;
            background-positioncenter;
            background-sizecover;
        }
        
        #flip,
        #panel {
            background-colorbrown;
            colorblack;
            font-weightbold;
            bordersolid 1px #c3c3c3;
        }
        
        #flip {
            line-height40px;
            height40px;
        }
        
        #panel {
            text-aligncenter;
            padding-top20px;
            padding-bottom30px;
            displaynone;
            width40%;
        }
        
        ul li {
            list-stylenone;
        }
        
        ul li a {
            list-stylenone;
            line-height30px;
            text-decorationnone;
            colorblack;
            font-weightbold;
        }
        
        ul li a:hover {
            colorblack;
            letter-spacing3px;
            font-weightbolder;
            transition: letter-spacing 0.2s ease-in-out;
            font-stretchextra-expanded;
            border-bottom3px solid black;
        }
        /* menu styling */
        
        #menu {
            positionabsolute;
            z-index2;
            left10px;
            font-size28px;
            cursorpointer;
        }
        
        #menu:hover {
            transformscale(1.09);
            font-weightbolder;
        }
        /* tag name you can change of this according to you */
        
        span {
            margin-right10px;
        }
        
        #tag-name {
            positionabsolute;
            right20px;
            font-weightbolder;
            top8px;
            letter-spacing2px;
        }
        
       
    </style>
</head>

<body>

    <div id="icon"><a id="menu">&#9776;</a></div>
    <a id="tag-name" contenteditable="true" draggable="true">Easy coding.7</a>
    <div id="panel">
        <ul>
            <li><a href="#"><span class="fa fa-home"></span>Home</a></li>
            <li><a href="#"><span class="fab fa-servicestack"></span>Home</a></li>
            <li><a href="#"><span class="fa fa-angle-double-right"></span>Home</a></li>
            <!--here you can increase of this according to your requirement -->


        </ul>
    </div>


</body>

</html>

Comments

Popular posts from this blog

Top 10 Data Analysis Tools For Your Business with Review Rated

  Top 10 Data Analysis Tools For Your Business with   Review and Rated            Data analysis  is one of the most backbone of the any success business now a days . you can not predict a success business without data analysis.  indirect or direct every business involve in Data analysis.  every business organization  want to make his own approach in the whole market through this Data analysis .  Example : what will demand of any product in Future    according to previous selling product or on demand  products  that why every business organization or business needs Data analysis . Here we will see that top 10 ten Data analysis Tools for your any business and if you are student and you are  interest to learn Data analysis and you need any free data analysis tool for exercise so don't  worry you will get two free tools with download link at the last of this all tools in this web page . There are ...

Function in Python programming language

  Function in Python? In Python, a function is a group of related statements that performs a specific task. Functions help break our program into smaller and modular chunks. As our program grows larger and larger, functions make it more organized and manageable. Furthermore, it avoids repetition and makes the code reusable. Syntax of Functio n def function_name ( parameters ): """ docstring """ statement(s) Above shown is a function definition that consists of the following components. Keyword  def  that marks the start of the function header. A function name to uniquely identify the function. Function naming follows the same rules of writing identifiers in Python. Parameters (arguments) through which we pass values to a function. They are optional. A colon (:) to mark the end of the function header. Optional documentation string (docstring) to describe what the function does. One or more valid python statements that make up the function body. Stateme...

Glowing text in css

Glowing text in CSS Hello student in this tutorial we will see that how to make glowing text in css  so let's  break down this topic here . 1 . we taking a div or any tag, class, id for targeting text so here i am taking a id so first  we will center of this element through position absolute like this       #text  {              /* position center through position absolute*/              position :  absolute ;              top :  40 % ;              left :  50 % ;              transform :  translate ( -50 % ,  -50 % ); } 2. Again in this css we coding for text shadow like this through text-shadow careful...