Questions tagged [toggle]

To toggle a boolean variable is to switch it to its opposite state. If it is on, switch it off; if it is off, switch it on. In a desktop or web user interface, a toggle may be clickable switch or button that alternates the state of something in the application.

To toggle a boolean variable is to switch it to its opposite state. If it is on, switch it off; if it is off, switch it on. In a desktop or web user interface, a toggle may be clickable switch or button that alternates the state of something in the application.

5926 questions
27
votes
2 answers

How do I make a element a regular tab stop within a form?

I made a form control which uses as its container (see the Yes/No toggler below) Here's the code for that: Yes No My CSS isn't relevant…
mydoglixu
  • 934
  • 1
  • 7
  • 25
27
votes
8 answers

Change div text with jQuery Toggle

When using slideToggle, how to change the Text close/show? I did a simple one, but cannot get the text change back. Here is what I did: $(document).ready(function(){ $('.open').click(function(){ …
olo
  • 5,225
  • 15
  • 52
  • 92
26
votes
7 answers

How to make HTML button look pressed in using css?

How do I style a button, with a shadow, so that it looks like it is pressed in? I tried using box-shadow: ... ;. But this didn't have any affect.
philr
  • 1,860
  • 1
  • 21
  • 31
25
votes
13 answers

jQuery .toggle() not working with TRs in IE

I am using jQuery's toggle() to show/hide table rows. It works fine in FireFox but does not work in IE 8. .show()/.hide() work fine though. slideToggle() does not work in IE either - it shows for a split second then disappears again. Works fine in…
Robert MacLean
  • 38,975
  • 25
  • 98
  • 152
25
votes
6 answers

How to get the value of a Bootstrap toggle button in jQuery

I have this markup and jQuery but I cannot successfully capture the button value or on/off or any form of recognition of the setting of the toggle: HTML
H. Ferrence
  • 7,906
  • 31
  • 98
  • 161
24
votes
3 answers

Javascript/Ember - Toggle Boolean Value of Variable

I know that there is the .set() method to set a boolean to true or false but I want to know if there a method like .set() except it Toggles the value of a boolean. In this case the boolean isEditing is being set to 'true'. isEditing:false, actions:…
Ian Steffy
  • 1,234
  • 3
  • 18
  • 45
22
votes
6 answers

visual studio C++ toggle comment ? comment while not whole line is selected?

2 questions actually : 1) shortcut to toggle comment on selected lines ? Available on all iDEs I used starting with notepad++ 2)the ctrl-k, ctrl-c exhibits this behavior (quoted from someplace nicely worded): C#: Each line where some text is …
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
21
votes
4 answers

Data-toggle tab does not download Leaflet map

I am using tabs to display clear content, but one of them stopped downloading well since it is in the data-toggle tab. It is a Leaflet map. Here is the code : Navbar code :
21
votes
2 answers

Angular js - show/hide loading gif every new route

I'm trying to toggle (hide/show) a loading gif on every new route, so my logic would be: routeChangeStart = show loading gif routeChangeSuccess = hide loading gif This is my code: //ANGULAR app.run(function($rootScope) { $rootScope.layout…
itsme
  • 48,972
  • 96
  • 224
  • 345
20
votes
9 answers

Switch/toggle div (jQuery)

I wish to accomplish a fairly simple task (I hope!) I got two div tags and one anchor tags, like this: forgot password?
I wish use…
Jan
20
votes
5 answers

React.js implement menu [highlight active link]

The following React.js code renders a navbar with two links named 'about' and 'project'. On page load the 'about' link is active and colored red. When the other link is clicked the state of the navbar is set to 'project', 'about' link style is set…
B. Kwok
  • 853
  • 2
  • 9
  • 13
19
votes
1 answer

Toggle button in WPF

I am new to wpf . I want to create toggle button like how can I achieve this. should I need to use two buttons and on click of each I need to disable other one. or there is anything else like toggle button in wpf. what is best way to achieve…
Neelam Prajapati
  • 3,764
  • 3
  • 28
  • 62
19
votes
3 answers

Animate drawer icon into arrow on setDisplayHomeAsUpEnabled?

I'm using setDisplayHomeAsUpEnabled in order to show the arrow instead of the drawer "burger" icon but it's not getting animated or anything. Instead it shows the arrow drawable instantaneously. Home screen: (Album 1) When you tap a movie: (Album…
Vextil
  • 191
  • 1
  • 1
  • 8
19
votes
2 answers

What is alternative to use after jQuery 1.9 removed .toggle(function,function)?

Hi i'm trying to create something that will alternate shrinking and growing on every click, but i'm using jQuery 1.9 for my website. the .toggle(function,function) function was removed from jQuery 1.9, so I'm not really sure what I should use…
Glen Takahashi
  • 861
  • 1
  • 10
  • 19
18
votes
1 answer

Android Set ImageButton as Toggle

How can I have an imagebutton stay in the 'pressed' state when it is clicked? Basically I just want the background to be the depressed background, but I can't figure out how to set it. At the moment, I've just copied the selected button background…
Kleptine
  • 5,089
  • 16
  • 58
  • 81