
Any other ideas? I appreciate any thoughts.

I'm still not getting the behavior I'd expect - nothing happens. Protected void btnValidate_Click(object sender, EventArgs e) The navbar comes with a simple and clean design in horizontal layout. The navbar hides on scroll down and shows on scroll up. It detects the page scrolling position and applies show/hide rules accordingly.
#Showhide javascript code
I changed my script to this (nothing omitted from this script):ĭocument.getElementById('').style.display = "block" Ĭhanged ASP to this (omitted surrounding table elements): Ĭhanged code behind to this (omitted other code withn submit function): Demo Download (5 KB) This JavaScript code snippet helps you to create a show hide navbar functionality on scroll event.

But there is obviously something wrong with the way I'm handling the visibility portion of the table rows. Make sure that you import a jQuery library if you want to use jQuery statements in a theme in place of vanilla JavaScript. If I add an alert popup in my javascript function, it works like a dream. ("onKeyUp", "return HideValidated(this.form)") Here is what's in the btnValidate_Click method in my code behind: The visibility doesn't change at all.ĭocument.getElementById('').style.display = "inline" ĭocument.getElementById('').style.display = "none" To their address after they have validated, they need to be forced to validate again.

The "validate" button goes away, the validated address is displayed and a "submit" button shows up. With jQuery, you can hide and show HTML elements with the hide() and show(). Instructor Our app now uses jQuery in just one final place, to animate the appearance of the results. The user inputs their address and clicks the "validate" button. Hide, Show, Toggle, Slide, Fade, and Animate. Show and hide elements using vanilla JavaScript. I have an address page that validates via USPS.
