How to make quick disabling/enabling of all the elements in any div (inputs, links and jQ Buttons)?
11105
I was under the assumption that if I disabled a div, all content got disabled too.  However, the content is grayed but I can still interact with it.  Is there a way to do that? (disable a div and get all content disabled also)
98146
Every time I toggle active class in a list (to dynamically change DOM content) I find that I always go to this approach to check and clear which class is active. I'm still fairly new to using pure javascript so I'm wondering if there is a better, simpler approach?  It feels like having to run a second function to clear out all active classes seems grunty.   I've included an example of how I do it.    var specialNav = document.getElementById("special-nav");  if (specialNav) {   var navItems = specialNav.getElementsByTagName('li');   var i;   for (i = 0; i &lt; navItems.length; i++) {     navItems[i].addEventListener("click", function() {       if (!this.classList.contains('active')) {         clearActives(navItems);         this.classList.toggle('active');       }     });   } }  function clearActives(classlist) {   if (classlist) {     for (i = 0; i &lt; classlist.length; i++) {       classlist[i].classList.remove('active');     }   } } .active {   color: red }  li {   cursor: pointer; } &lt;div id="special-nav"&gt;   &lt;ul&gt;     &lt;li class="active"&gt; 1&lt;/li&gt;     &lt;li&gt;2&lt;/li&gt;     &lt;li&gt;3&lt;/li&gt;     &lt;li&gt;4&lt;/li&gt;   &lt;/ul&gt; &lt;/div&gt;
6283
Is there a way to disable a tab in a ?
73555
I am currently trying to write javascript within a script editor to hide the 'View Properties' and 'Edit Properties' items in the ECB.  I have found many solutions that edit the core.js file. However, that is not preferable for me as there are multiple sites adn this is not for every site and every library. Eventually this will be applied to a certain library but right now I would just like this to work in general before I worry about that.  I have tried removing the item when the menu is loaded using the below javascript. Where #mp6_0_3 is the id of the 'Edit Properties' menu item.  &lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt; &lt;/script&gt;   &lt;script language="javascript" type="text/javascript"&gt;  $(document).ready(function() {     $('.ms-core-menu-list').live('mouseover', function() {         $('#mp6_0_3').parent().hide();         $('#mp6_0_3').remove();            }); }); &lt;/script&gt;
85862
This page does it the way I want it to:   But I want to find a better way using jQuery, can anyone point me to a good script that uses jQuery to accomplish this?
93415
When the user tabs into my NumericUpDown I would like all text to be selected. Is this possible?
63143
Can I somehow disable spell-checking on HTML textfields (as seen in e.g. Safari)?
10276
Is there a shortcut for switching between these three modes?
61962
How do you impose a character limit on a text input in HTML?
59733
In some of my nodes I need to show only "body" part of node. I don't want to show blocks etc. in those nodes. How can I do this ?   Create a new "content type" and put the data from existing nodes to that type of node. And excluding that "content type" from each of the blocks. By using javascript/jquery like: $('div'.block).remove()   Any more elegant answers?
35574
Is there a way to turn option strict off for just a single line of code?    I'm doing some maintenance work and I need to "cheat" in just one place and I don't want to lower the standard for the entire file.
45155
I am attempting to replace JS buttons with quick actions. These button simply call a web service method and alert the result and need no user interaction.  With quick action a modal always seems to appear and this is not desirable.   I am calling the Webservice method in the doInit function and  firing a toast event with the results and have no need for the modal popup.  Seems an oversight maybe? But is there a way to accomplish this without the modal to closely mimic the JS button functionality?  Ideally we could show the spinner without the modal   Right now I am simply calling   $A.get("e.force:closeQuickAction").fire();   at the end of the doInit but it is not the most ideal in way of a UI to do this IMHO as it flashes the modal on the screen briefly.
104687
I am using &lt;a&gt; tags for links on a web page. How do I disable the Tab key from selecting either of them?
22840
I'm building an HTML UI with some text elements, such as tab names, which look bad when selected. Unfortunately, it's very easy for a user to double-click a tab name, which selects it by default in many browsers.  I might be able to solve this with a JavaScript trick (I'd like to see those answers, too) -- but I'm really hoping there's something in CSS/HTML directly that works across all browsers.
46745
How can you programmatically tell an HTML select to drop down (for example, due to mouseover)?
52017
I just noticed that clicking a JS-like link on MSO (like to show more hot network questions) just bumps me to the top of the page and doesn't do anything else.   Also, adding a comment or any other JS-related feature (i.e. inline editing, 10k inline comment editing) is borked.
92253
Large website design with many, many layers. Need a way to move one element to the new designated group without dragging forever in the layers palette.