Skip to main content
0
Search products
Search
Mugs
Tees
Hoodies
Search products
Search
Chat
Share
Free Shipping
Menu
Mugs
Tees
Hoodies
Back to urbandictionary.com
Pro Customization
Create unique products with your own words and definitions
Preview
Personalize Your Design
Your Word
Your Definition
What you just saw when you dragged a UI element into the [search bar]. This happens because web [developers] really like to use the HTML <a> element for buttons instead of the actual <button> element. You can give the element [functionality] by listening for its click event and doing things then, but the <a> element is intended for creating hyperlinks and as such won't work without a set href attribute (AKA the link that you are taken to when you click on it). Therefore, you can use the void JavaScript operator, which will return the value undefined. If the browser is told to go to undefined, it will just keep the current page open. void will also evaluate its operands first, so <a href="javascript:void(alert('you clicked me'))">click me</a> would show "you clicked me" when clicked, but most people would just use javascript:void(0) and alert "you clicked me" on the click event, as said before. [Urban Dictionary] uses the javascript:void(0) technique for some of its UI elements, so when you just dragged the browse (or categories, or cart) button into the search bar, and I know you did, its href attribute was copied into the search bar, and now you're looking at javascript:void(0) and contemplating your life choices.
Text fits
Save
Cancel
🤖
Shopping Assistant
Online
Hey! 👋 I'm your shopping assistant. What are you looking for?
Ask about products
AI-generated responses. Verify claims.