Javascript Show Hide Div Onclick

onclick, not elem. gif, div_image4. There has got to be an easier way. I think its important to say you should also put in a non-javascript way navigating to the desired target for reasons of accessibility – both for non-javascript users and for those using text-only browsers for instance. Here is a more reusable and flexible toggle function that takes 2 parameters: one for the div to hide/show and a second parameter for the div that contains the link text to be switched. how to achieve it? if i am not using 'data-toggle=buttons' it is working but i want to use this data-toggle=buttons. jQuery Show and Hide Effects. I want to have a show/hide function for a DIV, using javascript/DOM properties. Do you have any idea why this is. In this example, the item that gets clicked to toggle has the class “click-to-toggle”. Save Your Code. As you can read in the documentation of slideToggle, you’ve got a callback. The matched elements will be revealed immediately, with no animation. ? If yes, then this article is for you. Hi, I am using bootstrap 3. gif, div_image4. Today’s tutorial will show you how to hide away extra bits of content using CSS and JavaScript, to be revealed at the click of a button. Can you have another look please i have added the above code but the fullsize div doesn't seem to be coming up when i click the thumb. The matched elements will be revealed immediately, with no animation. This time I'll show you how to do it with style. Then attatch a javascript onclick event to a. The following helpers are basically vanilla JavaScript clones of jQuery's $. div onclick = hide / div onclick = show keep results after refresh Hello! I have a question, i am very noob 1st of all so everything must be really well explained otherwise its the same as nothing since i will not understand xD. This script will transform a simple list of Hx/contents into shiny and accessible hide/show – collapsible regions – using ARIA. A javascript question about toggling visibility of an element: I am using a hidden DIV to hold some "help" info for site users, to be made visible when the user clicks on an image (a question mark icon. Hide div onload, show onclick? If this is your first visit, be sure to check out the FAQ by clicking the link above. Here Mudassar Ahmed Khan has explained with an example, how to show and hide HTML DIV with TextBox based on DropDownList (HTML SELECT) selected value (selection) using JavaScript and jQuery. Although this is not implicitly present in JQuery, we can still achieve this by writing a custom code that triggers the show/hide event when a DIV visibility is changed. Here My Code Hints - #TenderReport Is a Div Id. Here are some how-to-use and some examples of this script. So let’s say you want to slideToggle the main div and want the div within that div to be shown with the jQuery function show(). To better understand keyboard events, you can use the teststand below. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. How to show and hide elements with vanilla JavaScript This week in my private Vanilla JS Slack channel (available to people who purchase one of my pocket guides), one of my students asked me how to replicate jQuery’s show(), hide(), and toggle() methods with vanilla JavaScript. < script language = "javascript" >. I think its important to say you should also put in a non-javascript way navigating to the desired target for reasons of accessibility – both for non-javascript users and for those using text-only browsers for instance. It is possible, and very easy! You must create 3 elements: input – checkbox with id, eg. Unfortunately for a brief second I can see the div on the page before the java script hide it. The problem. [JavaScript] Toggle (Show/Hide) HTML Element February 26, 2017 Edit on Github. We are brand engineers that provide companies with strategic marketing, design and branding solutions. Javascript onclick hide div. Forgive some of the syntax errors from the previous post but here is a working example in 8. Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python, Bootstrap, Java and XML. This can be done by using a href tag inside your div either enclosing text or an image. Recently, while restoring the popular Jupiter! WordPress theme, which several readers use to “skin” the Perishable Press website, I found myself searching for a simple, effective JavaScript technique for toggling element visibility. Do you have any idea why this is. when I click on image to show this div with post content, so I need to have uniqe class for each post and than this code. display = 'none'" or change onclick. I want to have a show/hide function for a DIV, using javascript/DOM properties. In this article, I am going to share easy examples that show how to trigger an action when an element on a web page is clicked. The following helpers are basically vanilla JavaScript clones of jQuery's $. I think its important to say you should also put in a non-javascript way navigating to the desired target for reasons of accessibility – both for non-javascript users and for those using text-only browsers for instance. ready(function(){ $('#. It only takes a minute to sign up. You can clear a field selection when another field is changed. I want to show or hide a web part on a page with the help of a simple HTML button. Hide div onload, show onclick? If this is your first visit, be sure to check out the FAQ by clicking the link above. Simple JavaScript hide/show. gif, div_image3. For a website I'm doing, I want to load one div, and hide another, then have two buttons that will toggle views between the div using JavaScript. You may have to register before you can post: click the register link above to proceed. ) It works, but only after the icon has been clicked twice. All code belongs to the poster and no license is enforced. Try and test HTML code online in a simple and easy way using our free HTML editor and see the results in real-time. How to Toggle HTML Display With JavaScript. Answer < html > < head > < script type= "text/javascript" > function Reveal(it, box) {!--f r o m w w w. This Example describes the way to display images using javascript and css. Below is the Javascript code that we will add the the Head section of the page. I am using Jquery slideToggle function for hide div after click on server side button,when i click on button div hide but after page refresh it shows again. You can show and hide HTML elements using the jQuery show() and hide() methods. Stack Overflow em Português is a question and answer site for programadores profissionais e entusiastas. This is my current code function. Displaying images using Javascript This Example describes the way to display images using javascript and css. Hi, I am using bootstrap 3. In this section, you will learn how to hide the button using JavaScript. jQuery: Very Simple Show/Hide Panel on Mouse Click Event Last Updated on July 13th, 2017 by App Shah 20 comments Here’s a simple tutorial on how to show/ hide a div using jQuery. If it's just a Post, then all of the divs are hidden as there is no specific div for the post type. // Get the button, and when the user clicks on it, execute myFunction document. I am trying to use javascript to hide a div before the page loads. Hello, I am fairly new to coding, but hopefully I can receive some help on here. The div boxes in the example are hidden by default using the CSS display property which value is set to none. The following is key points in the code: Two HTML div elements (line 24 and 25): one is control element and the other is content element. Unfortunately for a brief second I can see the div on the page before the java script hide it. getElementById("myBtn"). gif, div_image3. Just add below JQuery code snippet in your javascript file and voila, you can now handler ‘show’/’hide’ events using. It only takes a minute to sign up. You can clear a field selection when another field is changed. The library will automatically refresh the portion of the sidebar that needs rebuilding. GitHub Gist: instantly share code, notes, and snippets. As you can read in the documentation of slideToggle, you’ve got a callback. I am using Jquery slideToggle function for hide div after click on server side button,when i click on button div hide but after page refresh it shows again. All we do is set the display of an element to none, and then use a JavaScript function to toggle the display when a user clicks. If you dont have go sales and retailers installed you can simply copy the html items over to your report example in a similar fashion. So I decided to write this little blog instead. For this we are going to make program named image-slideshow-5. This is how to toggle showing and hiding an element with pure JavaScript. See the demo Find it on Github. hide() method animates the width, height, and opacity of the matched elements simultaneously. We can display or hide the layer by clicking the buttons. net controls but using jquery , i have tried many code but fail to achieve my goal codes i. how to achieve it? if i am not using 'data-toggle=buttons' it is working but i want to use this data-toggle=buttons. Answer < html > < head > < script type= "text/javascript" > function Reveal(it, box) {!--f r o m w w w. The problem. r/javascript: All about the JavaScript programming language! Just to add an alternative way: Events always make a round trip through the Dom tree, first they trickle downwards in the capture phase, then once they hit the deepest nodes, they bubble upwards in the bubbling phase. Last time I showed you how to make something appear and disappear on a web page. hide() method animates the width, height, and opacity of the matched elements simultaneously. Show Hide DIV with TextBox based on DropDownList Selected Value (Selection) using jQuery Here Mudassar Ahmed Khan has explained with an example, how to show and hide HTML DIV with TextBox based on DropDownList (HTML SELECT) selected value (selection) using JavaScript and jQuery. You can clear a field selection when another field is changed. You may have to register before you can post: click the register link above to proceed. slideUp() method animates the height of the matched elements. In the given example, we have created a button. Here Mudassar Ahmed Khan has explained with an example, how to implement OnClick event of HTML RadioButton using JavaScript. #htmlradiobutton #hideshowhtml #htmltutorials HTML tutorial on using javascript onclick event the HTML form elements hide and show. We will show and hide div on button click. Learn more. Simple JavaScript hide/show. Unfortunately for a brief second I can see the div on the page before the java script hide it. jQuery Show and Hide Effects. This is roughly equivalent to calling. In this section, you will learn how to hide the button using JavaScript. Solved: I have a javascript at a custom fields to hide/show the field based on another field value. Simply doing exactly what you want, change the content based upon which link is clicked. Displaying images using Javascript This Example describes the way to display images using javascript and css. The optional speed parameter specifies the speed of the hiding/showing, and can take the following values: "slow", "fast", or milliseconds. Below is the Javascript code that we will add the the Head section of the page. This is how I hide and show content using a class. how to show and hide the Div element using JavaScript. In this tutorial you will learn how to show hide HTML elements using jQuery. php) there is 2 divs that contains first a monitor-image with 3 computer screens, and then a div, that set an overlay over 2 of the screens - the divs like this:. Step 3: Create a button and call the function using onclick event. The example below demonstrates this feature. There has got to be an easier way. GitHub Gist: instantly share code, notes, and snippets. com/abell12youtube. In this tutorial, we’ll take a look at how to call JavaScript code on multiple DIV elements on the page, when they are missing the id attribute (or when calling an individual element is not permitted, for some reason. getElementById("myBtn"). It only takes a minute to sign up. As promised in my last entry, I'll be showing you a simple effect that you can do using jQuery: showing or hiding something, or a group of things, on the page. If it's just a Post, then all of the divs are hidden as there is no specific div for the post type. Still no luck with the show/hide though. In this code example we will learn how to show/hide Div using jQuery - toggle() function. For example, a user may select an option when filling out an on-line form, and their selection might cause other related form fields to appear. onclick = function() {myFunction()}; /* myFunction toggles between adding and removing the show class, which is used to hide and show the dropdown content */. Show/Hide Items You can show/hide items to the sidebar during the run time. Use this javascript code to show and hide a specific element in your html with the display or visibility property. Displaying images using Javascript This Example describes the way to display images using javascript and css. SharePoint 2010, "Edit HTML source" feature (see image) helps a lot in doing so, as, with its help you can put an existing web part in a DIV tag and then you can change the 'display' property of that DIV tag. < script language = "javascript" >. Recently, while restoring the popular Jupiter! WordPress theme, which several readers use to “skin” the Perishable Press website, I found myself searching for a simple, effective JavaScript technique for toggling element visibility. Javascript onclick hide div. If an element has a display value of inline, then is hidden and shown, it will once again be displayed inline. Show and hide columns based on checkbox javascript javascript for show and hide usercontrol on click of linkbutton I hide a data using functions and I need to show that when the button is clicked. Show and Hide div on radio button click using jquery February 4, 2011 April 2, 2013 Milap 42 Comments There are certain cases when you need to hide & show division on basis of some click event !. Learn more. You can use a callback to have an effect in and effect. In order to show the div we will need to add a Javascript function. show/hide thingy; show. A humble request Our website is made possible by displaying online advertisements to our visitors. ONCLICK, because DOM properties are case-sensitive. Download font icon. The library will automatically refresh the portion of the sidebar that needs rebuilding. css( "display", "block" ), except that the display property is restored to whatever it was initially. This had code worked for me $(document). See the demo Find it on Github. Answer < html > < head > < script type= "text/javascript" > function Reveal(it, box) {!--f r o m w w w. on() method similar to other implicit events. onclick = function() {myFunction()}; /* myFunction toggles between adding and removing the show class, which is used to hide and show the dropdown content */. For this we are going to make program named image-slideshow-5. I want to show or hide a web part on a page with the help of a simple HTML button. Javascript onclick hide div. The original developer used. Hi If I have 2 divs on a form how can I show them or not on click of a button. When users click on the control element, the content element will be shown if it's hidden, will be hidden if it's shown. invisible class so it is hidden. So I decided to write this little blog instead. css( "display", "block" ), except that the display property is restored to whatever it was initially. JavaScript code snippet to show or hide div on button click event using JavaScript, JavaScript code to show/ hide div. For instance, to react on arrow keys Up and Down or hotkeys (including combinations of keys). ready(function(){ $('#. Hiding a column in a table with JavaScript Using getElementById and setting the style to display:block and display:none respectively, it is possible to selectively show or hide html elements (such as entire columns in a table). Hello, I am fairly new to coding, but hopefully I can receive some help on here. j a v a 2 s. For these functions to work, it's required to store the initial/default display style of an element. The fundamental problem of the aforementioned ways to assign handlers – we can’t assign multiple handlers to one event. When the height reaches 0 after a hiding animation, the display style property is set to none to ensure that the element no longer affects the layout of the page. Work includes identity, branding, information design, web design, illustration, software design, icon design, and multimedia work. Slicker Show and Hide at Learning jQuery. "btnShowHideCSSClass" in my below code) - Then get you page viewer web part's ID using IE's developer tool bar. The HTML looks like this:. It works fine when I create an issue. This site uses cookies for analytics, personalized content and ads. The example below demonstrates this feature. php) there is 2 divs that contains first a monitor-image with 3 computer screens, and then a div, that set an overlay over 2 of the screens - the divs like this:. Javascript : Show Hide images Onclick On September 9, 2009 July 23, 2015 By bluecrims In Uncategorized Create 4 images with names [div_image1. Recently, while restoring the popular Jupiter! WordPress theme, which several readers use to “skin” the Perishable Press website, I found myself searching for a simple, effective JavaScript technique for toggling element visibility. Label can be placed where you want. Reversing the logic of the function will either require 2 clicks to show and 1 click to hide, or 2 clicks to hide and 1 click to show. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. #htmlradiobutton #hideshowhtml #htmltutorials HTML tutorial on using javascript onclick event the HTML form elements hide and show. Here is a more reusable and flexible toggle function that takes 2 parameters: one for the div to hide/show and a second parameter for the div that contains the link text to be switched. Javascript Form How to - Show/hide a text field/select option by selecting a radio button option. onclick= "showhide. It works fine when I create an issue. When the height reaches 0 after a hiding animation, the display style property is set to none to ensure that the element no longer affects the layout of the page. Show/Hide Button on SharePoint Web Part Today I want to show you my simple solution how to customize SharePoint Web Part in that way you have Show/Hide Button in Title cell of Web Part. SharePoint 2010, "Edit HTML source" feature (see image) helps a lot in doing so, as, with its help you can put an existing web part in a DIV tag and then you can change the 'display' property of that DIV tag. Today’s tutorial will show you how to hide away extra bits of content using CSS and JavaScript, to be revealed at the click of a button. When my page loads I would like div1 and div2 to both be hidden If user clicks Div 1 radio then div1 = visible div2 = hidden If user clicks Div. This causes lower parts of the page to slide up, appearing to conceal the items. You can show and hide HTML elements using the jQuery show() and hide() methods. hide() becomes an animation method. Below is the Javascript code that we will add the the Head section of the page. Demo of using one button to show or hide button for showing and hiding div layers through button clicks. Hi, I am using bootstrap 3. Here My Code Hints - #TenderReport Is a Div Id. The document object grabs the button and refers to property 'visibility' with style object. Basic Show and Hide at Learning jQuery. See the demo Find it on Github. You can clear a field selection when another field is changed. JavaScript Show Hide Scripts Samples. Try different key combinations in the text field. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. Show Hide DIV with TextBox based on DropDownList Selected Value (Selection) using jQuery Here Mudassar Ahmed Khan has explained with an example, how to show and hide HTML DIV with TextBox based on DropDownList (HTML SELECT) selected value (selection) using JavaScript and jQuery. How to add transition animations to vanilla JavaScript show and hide methods Yesterday, we looked at how to show and hide elements with vanilla JavaScript. php) there is 2 divs that contains first a monitor-image with 3 computer screens, and then a div, that set an overlay over 2 of the screens - the divs like this:. Just add below JQuery code snippet in your javascript file and voila, you can now handler ‘show’/’hide’ events using. Displaying images using Javascript This Example describes the way to display images using javascript and css. i am having 2 div. Using javascript onclick() with two buttons ('show' and 'hide', each in their own DIVs), it would work something like this: By default, the 'show' button is hidden, the main DIV and hide button are displayed. Basic Show and Hide at Learning jQuery. when you click on the links to each part of the page it shows the "back to top, next, back" buttons. com/abell12youtube. If an element has a display value of inline, then is hidden and shown, it will once again be displayed inline. For illustration purposes, when the RadioButton is clicked based on whether it is checked (selected) or unchecked (unselected), a JavaScript function will be called within which the HTML DIV with TextBox will be shown or hidden. Here's a quick JavaScript trick to control display settings. When my page loads I would like div1 and div2 to both be hidden If user clicks Div 1 radio then div1 = visible div2 = hidden If user clicks Div. jQuery show() and hide() Methods. As promised in my last entry, I'll be showing you a simple effect that you can do using jQuery: showing or hiding something, or a group of things, on the page. To better understand keyboard events, you can use the teststand below. I have been doing this with the div hide/show javascript however it makes me have to change sooo much information to do this. this is my current javascript:. We can display or hide the layer by clicking the buttons. Unfortunately for a brief second I can see the div on the page before the java script hide it. The optional speed parameter specifies the speed of the hiding/showing, and can take the following values: "slow", "fast", or milliseconds. Hide or show elements in HTML using display property Style display property is used to hide and show the content of HTML DOM by accessing the DOM element using JavaScript/jQuery. In the given example, we have created a button. this is my current javascript:. Assign a handler to elem. It is possible, and very easy! You must create 3 elements: input – checkbox with id, eg. Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python, Bootstrap, Java and XML. The matched elements will be revealed immediately, with no animation. We would like to know how to show/hide a text field/select option by selecting a radio button option. This choice is made for purely demonstrational purposes, and you can do the same operations using another widget following the same guidelines. The display property is saved and restored as needed. One way that JavaScript is commonly used is to hide or display content based on user behavior. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. It only takes a minute to sign up. So if I click button 1 I want div 1 (but not div 2) to show, if I click button 2 I want div 2 (but not div 1) to show. I am making a website and am using innerHTML to show text when someone clicks on a word. // Get the button, and when the user clicks on it, execute myFunction document. We will pass the ID attribute of the Div to the function. Here are some how-to-use and some examples of this script. The fundamental problem of the aforementioned ways to assign handlers – we can’t assign multiple handlers to one event. Participate in discussions with other Treehouse members and learn. addEventListener. There has got to be an easier way. By continuing to browse this site, you agree to this use. Displaying images using Javascript This Example describes the way to display images using javascript and css. GitHub Gist: instantly share code, notes, and snippets. Work includes identity, branding, information design, web design, illustration, software design, icon design, and multimedia work. Javascript Hide/Show Div onClick? I have a page where it has anchors going to different parts of the page and i have a list of links at the top to go to each anchor. All code belongs to the poster and no license is enforced. Hide and Show div on page load. Here Mudassar Ahmed Khan has explained with an example, how to implement OnClick event of HTML RadioButton using JavaScript. It would take me forever to finish doing this to all of them, i need a better way to achieve this. If an element has a display value of inline, then is hidden and shown, it will once again be displayed inline. The following example will demonstrate you how to show and hide div elements based on the selection of checkboxes using the jQuery toggle() method. For illustration purposes, when the RadioButton is clicked based on whether it is checked (selected) or unchecked (unselected), a JavaScript function will be called within which the HTML DIV with TextBox will be shown or hidden. For this we are going to make program named image-slideshow-5. This Example describes the way to display images using javascript and css. gif, div_image4. It works fine when I create an issue. Javascript Hide/Show Divs onClick Hi, I have analyzed your requirement and found that it will be nice to handle this process in a fashion to accomodate the future needs and to provide a little bit sophisticated code so that unwanted code does not lie within the page. For these functions to work, it's required to store the initial/default display style of an element. You can show and hide HTML elements using the jQuery show() and hide() methods. This causes lower parts of the page to slide up, appearing to conceal the items. For instance, one part of our code wants to highlight a button on click, and another one wants to show a message. Specifically, I needed to accomplish the following design goals. hide() method animates the width, height, and opacity of the matched elements simultaneously. I have a menu with submenus under each menu item. net which contains some asp. Assign a handler to elem. onclick= "showhide. addEventListener. Please try again later. Keyboard events should be used when we want to handle keyboard actions (virtual keyboard also counts). This feature is not available right now. So let’s say you want to slideToggle the main div and want the div within that div to be shown with the jQuery function show(). ) It works, but only after the icon has been clicked twice. Basic Show and Hide at Learning jQuery. - Add CSS Class name to your left web part's Show/Hide Button. This is how I hide and show content using a class. hide() method animates the width, height, and opacity of the matched elements simultaneously. Showing & hiding div layers on button clicks We can control a layer by connecting it to buttons. com/abell12youtube. Replace 363 with the ID of the field to hide/show. This causes lower parts of the page to slide up, appearing to conceal the items. The library will automatically refresh the portion of the sidebar that needs rebuilding. For illustration purposes, when the RadioButton is clicked based on whether it is checked (selected) or unchecked (unselected), a JavaScript function will be called within which the HTML DIV with TextBox will be shown or hidden. This script will transform a simple list of Hx/contents into shiny and accessible hide/show – collapsible regions – using ARIA. This helps you to toggle the div using jquery also the height of the div will toggle easily. It is possible, and very easy! You must create 3 elements: input – checkbox with id, eg. The hide() method simply sets the inline style display: none for the selected elements. Can you have another look please i have added the above code but the fullsize div doesn't seem to be coming up when i click the thumb. Show Hide DIV with TextBox based on DropDownList Selected Value (Selection) using jQuery Here Mudassar Ahmed Khan has explained with an example, how to show and hide HTML DIV with TextBox based on DropDownList (HTML SELECT) selected value (selection) using JavaScript and jQuery. Javascript Hide/Show Div onClick? I have a page where it has anchors going to different parts of the page and i have a list of links at the top to go to each anchor. When these properties reach 0, the display style property is set to none to ensure that the element no longer affects the layout of the page. Hi, I have some code below which works fine if I have just one show_BlockUser div on the page, but how can I alter it to work for multiple divs? I was thinking of using my_id in the div id,. Here's a quick JavaScript trick to control display settings. Keyboard events should be used when we want to handle keyboard actions (virtual keyboard also counts). onclick= "showhide. How to Toggle HTML Display With JavaScript. If you dont have go sales and retailers installed you can simply copy the html items over to your report example in a similar fashion. Hide div onload, show onclick? If this is your first visit, be sure to check out the FAQ by clicking the link above. This is my current code function. In the given example, we have created a button. Hide or show elements in HTML using display property Style display property is used to hide and show the content of HTML DOM by accessing the DOM element using JavaScript/jQuery. Hide and show menu if button clicked and change the icon. I want to show or hide a web part on a page with the help of a simple HTML button. Recently, while restoring the popular Jupiter! WordPress theme, which several readers use to “skin” the Perishable Press website, I found myself searching for a simple, effective JavaScript technique for toggling element visibility. There's too much code that its confusing. display = 'none'" or change onclick. < script language = "javascript" >. How to add transition animations to vanilla JavaScript show and hide methods Yesterday, we looked at how to show and hide elements with vanilla JavaScript. A humble request Our website is made possible by displaying online advertisements to our visitors. In this section, you will learn how to hide the button using JavaScript. Hello, I am fairly new to coding, but hopefully I can receive some help on here. In this article, the Button widget is used to demonstrate how to show and hide the Popup. Keyboard events should be used when we want to handle keyboard actions (virtual keyboard also counts). Show/Hide Toggle Sliding Menu With CSS & JavaScript Mar 15, 2013 I sometimes find annoying having to go back to the top of a web page in order to reach the main menu. Once the height reaches 0 (or, if set, to whatever the CSS min-height property is), the display style property is set to none to ensure that the element no longer affects the layout of the page. In the given example, we have created a button. Show/Hide Elements with Javascript; Coldfusion/javascript Show/hide; Javascript SHOW/HIDE Help; show hide layer in IE and Mozilla; Nested Show Hide Div Form Elements; RowDataBound: testing for data elements for conditional show/hide; Show/hide multiple elements with one link using javascript; Hide / Show form Elements. How to use the jQuery onClick event. The following is key points in the code: Two HTML div elements (line 24 and 25): one is control element and the other is content element. Where web developers and designers learn and share how to design websites, build mobile applications, create WordPress themes, write code, HTML, JavaScript, PHP, Java, and much more!. Hi, I have some code below which works fine if I have just one show_BlockUser div on the page, but how can I alter it to work for multiple divs? I was thinking of using my_id in the div id,. For this we are going to make program named image-slideshow-5. Reversing the logic of the function will either require 2 clicks to show and 1 click to hide, or 2 clicks to hide and 1 click to show. A video tutorial showing you how to show and hide a div tag using java script Follow us on Twitter: http://www. I want to have a show/hide function for a DIV, using javascript/DOM properties. ZURB, creating unique customer and user experiences.