Hide/Show Select2

I do a similar thing, however I hide the select2 container which is always the next node over from the start point so it would look like. $(document).on(‘change’, ‘.country’, function () { if ($(this).val() == $(this).data(‘current-countryCode’)) { $(‘#states’).next(“.select2-container”).show(); } else { $(‘#states’).next(“.select2-container”).hide(); } }); So I have been taking the same approach you have

Hiding a button in Javascript

You can set its visibility property to hidden. Here is a little demonstration, where one button is used to toggle the other one: <input type=”button” id=”toggler” value=”Toggler” onClick=”action();” /> <input type=”button” id=”togglee” value=”Togglee” /> <script> var hidden = false; function action() { hidden = !hidden; if(hidden) { document.getElementById(‘togglee’).style.visibility = ‘hidden’; } else { document.getElementById(‘togglee’).style.visibility = …

Read more

Hide Show content-list with only CSS, no javascript used

I wouldn’t use checkboxes, i’d use the code you already have DEMO http://jsfiddle.net/6W7XD/1/ CSS body { display: block; } .span3:focus ~ .alert { display: none; } .span2:focus ~ .alert { display: block; } .alert{display:none;} HTML <span class=”span3″>Hide Me</span> <span class=”span2″>Show Me</span> <p class=”alert” >Some alarming information here</p> This way the text is only hidden on …

Read more

Hide Text with CSS, Best Practice?

Actually, a new technique came out recently. This article will answer your questions: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement .hide-text { text-indent: 100%; white-space: nowrap; overflow: hidden; } It is accessible, an has better performance than -99999px. Update: As @deathlock mentions in the comment area, the author of the fix above (Scott Kellum), has suggested using a transparent font: http://scottkellum.com/2013/10/25/the-new-kellum-method.html.

Permanently hide Navigation Bar in an activity

There is a solution starting with KitKat (4.4.2), called Immersive Mode: https://developer.android.com/training/system-ui/immersive.html Basically, you should add this code to your onResume() method: View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);