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...

Fahrenheit temperature and Kelvin changing in Celsius temperature with text in speech

Fahrenheit temperature and Kelvin changing in Celsius temperature with out in speech If you want of this source code in java language so click on it Get  How to speech of output : first we need to  import gtts and playsound package in python our code editer because in this program we want to speech of every output . then we will save of this variable with  obj.save( "any_name.mp3" )    and we also want to speech of this. after saving of this. we write like this  playsound( "any_name.mp3" )   for speech of obj.save. It is only for Text speech you can also use of this code-source for text -speech  #librery which by we can change text in speech in present of internt your system from gtts import gTTS #import playsound for play text speech from playsound import playsound #syntax of this is variable_name=gTTS(text="your text ", lang='language' ,slow=True or False) obj=gTTS( text = "text here for speeching ok my dear " , lang = '...