Skip to content

jatinkumar11954/drop-down

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

Image Changes on CLicking a Dropdown

How to change an image by clicking any button in a drop down???...

This ia a code for integration of a drop down to your website

Description:

There will be a drop down and in which when you press a button the image which is right side to that drop dwon will change

by using javascript (DOM) the images will change as per the selection of drop down.

Also included , the
.classname-scrollbar
{width:in px or %
}
attribute to the drpdwn class which is the dropdown element in the page
Is doesn't support in chrome so ::-webkit-scrollbar{} should be added in the attribute of the few class
There are also other properties of scroll bar can be changed Refer this site
To see in which browser does this support and which browser it excludes Refer this site

To Change info your favour

1. If you want a different image to be appeared the image link to be changed to your favour

Can also change your preferred image link

In the script at the src

document.querySelector('.elementimage img').src = "link_of_the_image"

Specify location of image



2.To change the width of scroll bar:--

.dropdown-content::-webkit-scrollbar {
width:in px or %

About

How to change image when a button in a drop down is clicked???

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages