FAQ Database Discussion Community


Associate toggle with another function

javascript,jquery,scroll,click,toggle
I have a problem combining a toggle function with another function involving a change of the css 'position' attribute. I have a starting page with a menu at the top and columns of pictures beneath it. Some columns are higher than the window and they can be scrolled down together...

Toggle a “hide table” button with “search” button

javascript,toggle
I want to toggle a "hide table" button with a "search" button so that it only appears when the searched table appears and disappears. Both the functions initiated by onClick work, it's just the toggle. Any help would be great! thanks. <input name="Search_Country" id="Search_Country" type="text"> <input type="button" value="Search" onclick="searched_country_table()"/> <input...

using mouseover to show search input type

jquery,toggle,show,mouseover
I'm trying to achieve a jquery function, by mouseoever a submit button, I want my search input type to appear, the same kind of effect as a slideToggle. I don't want to use width toggle because I don't want my search input to hide when hovering again my submit button....

JavaScript Accordion Menu with querySelectorAll()

javascript,toggle,accordion,custom-data-attribute,queryselectorall
I'm attempting to build an accordion menu using querySelectorAll() but unsure what the best method would be to check if the clicked list item's children (.toggleContent and .toggleIcon) belong to it's clicked parent toggle_li[i]. Correct me if I am wrong, but I assume that controlling this within the onclick function...

Toggle loop when a key is pressed?

loops,toggle,autohotkey
For instance, pressing TAB would turn off/on this loop: Loop { ;loop start GetKeyState, var, LButton, P If var = U Break Send {1} Random, r, 100, 400 sleep r } return Is this possible?...

How to toggle multiple classes for child element on parent click

javascript,jquery,css,toggle,slidetoggle
I am trying to toggle classes using jQuery and I'm struggling to do so. I have my HTML structure & jQuery as below <div class="mainFacet bmargin5"> <div class="head line"> <div class="facet-title" title="Click to collapse"> <h2 class="unit-line">Processor</h2> <span class="icon minus"></span> </div> </div> <ul style="display:inline-block"> <li>i3</li> <li>i5</li> <li>i7</li> </ul> </div> jQuery $('.facet-title').click(function...

JavaScript: css toggle switch to dark mode

javascript,jquery,html,css,toggle
I have created a toggle switch using css. I want #box1 to turn from a white background with black type to a black with white text and the toggle to turn to on. I'm stuck trying to figure out the JavaScript. The button doesn't switch and the box doesn't turn...

Toggle text + also call method with argument?

jquery,function,toggle
Im trying to toggle change a text on spacebar press with jquery ( works ) but also try to call a method with custom argument. How would below code example needs to me modified to do this? I have tried all kinds of ways but don't understand how to add...

How to create a mobile navigation toggle using pure CSS?

css,css3,navigation,toggle
I have an old site. Now I want to make it mobile friendly. So I am trying to add a mobile navigation and for making it works I want to use pure css only. NO javascript. I am not allowed to add JS code to the files. I tried following:...

Toggle arrow for jquery tabs

jquery,jquery-mobile,tabs,toggle
I have looked everywhere and cannot figure this out. I basically have set up some custom jquery tabs, here is the javascript and fiddle I have for it, Im guessing I need to add to it? $(function() { $("#tabs").tabs({ collapsible: true, hide: 'slideUp', show: 'slideDown', active: false }); }); http://jsfiddle.net/benopp/jadpcdvr/3/...

How to expand/collapse (+/-) for a nested dynamic list using jquery

javascript,jquery,dom,toggle
i have tried the toggle function but i think selecting a the proper list is having some problem. var json ={"Asia": [{"regionList": [{"regionName": "Eastern Asia","Countrylist": [{"countryName": "China","subCountryList": [{"subCountryName": "Southern China"},{"subCountryName": "Eastern China"}]},{"countryName": "Hong Kong"}]},{"regionName": "Southern Asia","Countrylist": [{"countryName": "India"},{"countryName": "Pakistan"}]}]}]}; var html = ''; $.each(json, function(i1, object) { html += '<li><input...

Toggle opening all table rows with one click

javascript,jquery,html,table,toggle
I have created a basic table using HTML. This table has nested elements which are supposed to open individually when you click on each assigned toggle. So when you click on a '+' icon it opens the a sub menu which also has an icon 'pitch' that opens up what...

Angular ensure toggle is closed if another one is opened

javascript,angularjs,toggle
Have two different divs that can be toggled open and closed in Angualar app but trying to make sure that if one is opened that the other one closes. Seems like this should be simple enough in NG but still new to Angular. Anyone have any pointers? Made an example...

How to show/hide hidden HTML table rows using JavaScript (no jQuery)

javascript,html,css,toggle,html-table
Edit: This has been answered below. I would like to have an HTML table that has hidden rows between each row with more information about the top level rows. When clicking an expand/collapse image link in the first column, the hidden row's visibility will toggle from display:none; to display:table-row;. I...

jQuery only applies to the first elements on every page [closed]

jquery,toggle,element
I have a bunch of html elements with the same ids and classes. I have added a jQuery toggling function to these classes and ids, but it only works properly on the 1st samples on every page. How do I fix it?

Toggle text of a button on click Jquery

javascript,jquery,toggle
I'm looking to toggle the text of a button on the click using jquery, But it is not working properly. <asp:Button ID="btnedit" runat="server" Text="Edit" Visible="True" CssClass="actButton" CausesValidation="False" OnClick="btnedit_Click" /> On client-side: $("#<%= btnedit.ClientID %>").click(function (e) { $(this).text(function (i, text) { return text === "Edit" ? "Cancel" : "Edit"; }); });...

JQuery toggle opacity with click

jquery,css,click,toggle,opacity
I have two divs (A and B) and two buttons and I'm trying to achieve this effect: when I click on one button the opacity of div A increase, while opacity of div B decrease, and vice versa. But it seems to work only when decrease... Can't understanfd what's wrong....

Replacing a jquery toggle button with an image

jquery,toggle
I would like to replace the toggle button with an image. I was wondering if there is a way to do this by simply adding a background to the code. Ideally I would like to simply add something like < button background="url"> Here is the code I am using: <script>...

Toggling table rows inside an HTML table

javascript,jquery,html,toggle
I have created a basic table using HTML. This table has nested elements which are supposed to open individually when you click on each assigned toggle. So when you click on a '+' icon it opens a sub menu, containing numerous table rows, each one of these has an icon...

How to check if toggle function show item?

javascript,toggle
I have this code ... <div class="btn1">Button</div> <div class="text1">Some text</div> ... $(document).ready(function(){ $(".btn1").click(function(){ $(".text1").toggle(); }); }); <div class="block2">Some text 2</div> I want to hide ".block2" when toggle function show ".text1" and show ".block2" when ".text1" is hidden. How can I do that? I hope my question is clear. Thanks for...

Show/Hide All or Toggle Multiple divs With One Checkbox

javascript,jquery,checkbox,toggle,show-hide
Forgive me if this topic has been overdone. I've read through lots of posts and haven't quite found what I'm looking for, which is why I'm asking. I want to have one checkbox that says "Show All" and when you check it multiple divs show. When you uncheck it, the...

Android textview hide show toggle

android,textview,toggle
i have created 3 textviews(utilities,bmi,bmr).If i click on utilities, bmi and bmr should toggle(hide/show).How to achieve this. Thankyou in advance

find a div by classname and replace it with a div based on onclick - jquery

javascript,jquery,find,toggle,show-hide
There are 8 divs and an empty div. Also there are 8 checkboxes. Initially 4 divs are displayed and the remaining are display:none and 4 checkboxes are checked and remaining are uncheked The Fiddle link is here This is my code <div class="container"> <div class="empty" style="display:none;"></div> <div class="content div_box_1"> <div...

Is there a JSF toggle component or a way to theme an h:selectBooleanCheckbox with images?

jsf,button,checkbox,toggle
I tried using a toggle like below. Although it works, it breaks when used inside of a composite component - changing the singleSelect value outside of the component never updates inside the component: <h:commandButton disabled="#{cc.attrs.singleSelect}" image="/resources/img/collapse-single.gif"> <f:ajax listener="#{cc.toggleSingleSelect}" render="#{cc.clientId}"/> </h:commandButton> <h:commandButton disabled="#{! cc.attrs.singleSelect}" image="/resources/img/expand-single.gif"> <f:ajax...

jQuery Replace Link Text with Show and Hide

jquery,toggle,show-hide
I'm trying to change some 'Show More' link text to 'Show Less' once the associated content has been revealed, using jQuery. I have created a jsfiddle to illustrate what I have done so far. I also need the content to close when I then click on the 'Show Less' link....

jQuery toggle text change and hide elements

javascript,jquery,css,toggle
Trying to create a simple function where a user clicks a button, it shows a form and changes the text on the button. When they click it again, the form hides and button text changes back to what it was. Here is what I have so far: $('a.subscribe').click(function() { var...

Bootstrap Toggle for Checkbox adding extra div

jquery,checkbox,toggle,clone,bootstrap-switch
We have a form where users can create a shipping type by entering a name in a text field and optionally toggle a checkbox. To add another shipping type, we use jQuery's clone method to rebuild the fields one or more times. My goal is to change the checkbox into...

Android “Toggle off all buttons”

android,switch-statement,toggle
I am making an app that toggles off and on a switch. I have 4 switches in total and at the bottom I would like to have a button that will toggle them all off at the same time - like an override switch. I'm trying to follow the same...

Trying to toggle this jQuery menu at 2 different screen sizes

jquery,html,css3,toggle
I'm working on this navigation, and I've got code for how it works on two different screen sizes. 600px and below, and then anything over 600px. Each menu works fine independently at each size, but I can't seem to get them menus to go back and forth, like if you...

Playing “peek-a-boo” with jQuery Menu

javascript,jquery,menu,toggle
So I'm working on this menu that I'm trying to expand/contract on click. After fighting for 2 weeks (in my spare time) with javascript, I've decided to try and tackle this with jQuery. It's so much easier! Well, kinda. I managed to make the 2nd level of my 4 level...

SSRS Parameters - Toggle a parameter's NULL checkbox depending on value other parameter(s) NULL checkboxes

reporting-services,parameters,toggle,optional-parameters
In MS SQL Server Report Builder 3.0, I have an SSRS report with 3 parameters: start date (date) end date (date) last number of days (integer) My Stored Procedure needs either a Date Range OR the last number of days, not all 3 (they are set to NULL by default)....

How can I change this list of buttons/menus so that only one menu is visible at a time?

javascript,toggle
Here is my code: $(document).ready(function(){ $(".btn1").click(function(){ $(".menu1").toggle(); }); $(".btn2").click(function(){ $(".menu2").toggle(); }); $(".btn3").click(function(){ $(".menu3").toggle(); }); $(".btn4").click(function(){ $(".menu4").toggle(); }); }); #button{ height : 35px; line-height : 35px; text-align : center; background-color : grey; border-top : 2px solid white; border-bottom : 2px solid white; } #menu_to_show{ border: 2px solid orange; height : 50px;...

Making a toggle switch

jquery,css,toggle
How do I make a toggle switch with the button starting a the middle position. Then on click will animate the left position property so that the button will be on the left. Clicking a second time will reset the position back the middle. Clicking a third time will move...

javascript toggle table rows and group elements

javascript,table,toggle,rows
I have a table like this: http://jsfiddle.net/uow54mex/1/ its a very simple table like <table> <thead> <tr><th>....</...></thead> <tr><td>.... </table> I want to automatically group all table rows by name, so in the very left column should be every user only once. If a visitor clicks on a user, the row should...

JQuery toggle is hiding the div element

jquery,html,css,toggle
I'm having some trouble with developing an expand-shrink toggle div. My goal is to click the div and make it bigger, clicking it again and get it back to the original height. I got this JQuery script but it is causing the entire div to disappear. $(document).ready(function () { $(".noticia").toggle(function(){...

jQuery hide and show toggle keeping active only one div

jquery,toggle,hide,show,toggleclass
I am a starter with JQuery, and Javascript, and I would like to know how should I edit the following code so that when I click on a heading, the content under the other headings, will be hidden? I also want the arrows to function properly. Basically, I want to...

Toggle() binded to WP menu item prevents clicking on sub-menu items

jquery,wordpress,menu,toggle
On my WP page I have a custom menu with one of the items ("COLLECTIONS") having a sub-menu, which is hidden by default and displayed when clicking on "COLLECTIONS" through this code: $( 'li.item_collection' ).toggle(function() { $( 'li.item_collection .sub-menu' ).slideDown( { duration: 200, easing: 'easeInOutExpo' } ); }, function() {...

What is the proper way to detect Bootstrap dropdown menu selections?

javascript,jquery,twitter-bootstrap,drop-down-menu,toggle
Using Twitter Bootstrap and the Javascript Dropdowns feature, what is the proper way to hide the menu on the .dropdown-menu LI A click event, as well as update some property on what was selected, without that A click event firing and going off to its href value? Here's the way...

How to restart cycling javascript cycle

javascript,jquery,html,css,toggle
I don't know how to make the title clearer, even though the question itself seems clear enough for me. I've been using this jQuery plugin: http://felix-kling.de/blog/2011/04/14/jQuery-Function-Toggle-plugin/ to make up for the toggle function that has been deprecated and removed in jQuery. then I have the following function: <script> $( document...

Showing div using anchor in URL

javascript,jquery,wordpress,toggle
I am using the jQuery-collapse plugin to hide/show the body content of posts, and want each post to also be accessible by URL. <div id="<?php the_slug(); ?>" data-collapse> <div id="collapse"> // Toggle content </div> <div class="main-content"> // Hidden content </div> </div> The method I am trying is to call the...

Toggling with variables in PHP

php,jquery,database,toggle
$last_itteration = false; while($row = mysqli_fetch_array($result)){ if ($row['egenskaps_navn'] == $last_itteration) { } else { echo "<h3>".$row['egenskaps_navn']."</h3>"; } echo "<span id='verdi_" .$row['verdi_id']."'>".$row['verdi_tekst']."</span><br />"; $last_itteration = $row['egenskaps_navn']; } $(document).ready(function(){ $('h3').click(function(){ $('span').toggle(); }); I have collected data from a database. The idea is that I want to toggle values to show from a...

Check if bit has toggled in C

c,bit-manipulation,toggle
I am working on bitwise manipulation (in C) and I wanted to know how to check if a bit has toggled between a previous value and the new value. Example : oldValue = 0x0FF //0000 1111 1111 in binary newValue = 0x100 //0001 0000 0000 in binary In this example...

Remove class on collapse (jquery)

javascript,jquery,toggle,collapse,removeclass
I tried looking for an answer, but none of it has solved my problem yet. I am a beginner in learning to understand this code language and I think that my problem lies there. I have created a JSFiddle with what I have up until now. (http://jsfiddle.net/fxmcb5yv/2/)! This is my...

Toggle li .active class

jquery,toggle
The li .active toggle in the following fiddle doesn't work. When i delete id="Colour54" in the input element, it works. Why is that? And how can i make this work. $(this).toggleClass("active"); https://jsfiddle.net/f0r8xd9b/1/...

jquery slider with button between the content panels

jquery,toggle,accordion,slide
I'm having problems with a pretty simple task.. I want to be able to switch between two content panels, but with only ONE button. I have looked at jqueryUI accordion, but that has a header for every content panel. i want to have a kind of "button" BETWEEN the two...

Change state of variable defined in ng-repeat in controller

javascript,angularjs,toggle,angularjs-ng-repeat
I'd like to know whether it's possible to change the value of a variable defined in ng-repeat from the controller or not ? I'm trying to initialize a simple variable "opened" used for toggling in a ng-repeat, inside the controller. <div ng-repeat="item in list"> <input type="checkbox" ng-model="active[$index]" ng-click="active[$index]?opened=true:''" /> <a...

Display:table and jquery toggle

javascript,jquery,css,toggle
I'm trying to achieve some sort of drop-down menu using jquery toggle, along with css display:table. The problem is that columns fits only visible elements (which does make sense...), but the result is really crappy as soon as user toggles an hidden element. Since my english isn't great, plese check...

jquery slidedown and slideup wiggles div

jquery,html,css,razor,toggle
http://eusville.com/eusVote/1/baltimore-sushi Click "Add Comment/Rate" button. As the comment box slides down, the page wiggles. Am very stumped. Googled around but can't find solution. Odd thing is problem is in Chrome and Firefox. IE works smooth ... The HTML div is: ... sorry, there's a lot of razor stuff there. Just...

Make Image Button Behave Like a Toggle Button

java,android,image,button,toggle
How can I have an on and off state for an Image Button? My goal is to have sound play when the image button is clicked, and for sound to stop when the button is clicked again. Thank you!

AVFoundation: toggle camera fails at CanAddInput

ios,swift,camera,toggle,avfoundation
I am trying to add a rotate camera function with AVFoundation to allow the user to toggle between the front-facing and back-facing cameras. As shown in the code below, I've put in some println() statements and all the values seem legit but the code always drops to the failed else-clause...

Toggle Button acting as an Image Button

android,xml,image,button,toggle
I need a toggle button to have an image and a background color. Currently, my toggle button only has an image and no background color. Here is the code for it <ToggleButton android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="centerCrop" android:layout_weight="1.0" android:layout_margin="5dp" android:onClick="onToggleClicked" android:textSize="0sp" android:checked="false" android:background="@drawable/soundfocuslone1"/> <selector...

Toggle DIV state localstorage

jquery,toggle,local-storage
Earlier today i asked a question on here, but didnt explained it properly and havent provided proper code. I have 2 toggle DIVs with links in them, and once user opens one and clicks on the link, page refresh with results, but that DIV closes itself. I would like it...

How can i make toggle from left whitout jquery-ui

javascript,toggle
How can i make toggle from left without using jquery-ui $(document).ready(function(){ $("button").click(function(){ $("#content").slideToggle(); }); }); <div id="content">This is a paragraph.</div> <button>my toggle</button> #content { background:khaki; padding:10px; } http://jsfiddle.net/kashifkiduniya/w6xzq5n4/1/...

Select element with jQuery without using ID

javascript,jquery,toggle
So I have a list of elements in an array. I'd like to add a jQuery toggle event to each element and pass in two functions as parameters. This is what I have so far, though it's giving me errors, saying that e (the Event Object) is undefined inside moveToSelected...

slideToggle not working when parent link is clicked

jquery,toggle,slidetoggle,slidedown,slideup
I have a list of links in a footer then when you click on the titles along the bottom a panel for each on slides up with links in. If one panel is open and I click another link along the footer, the open panel closes and the link in...

javascript else of toggle

javascript,toggle
Okay I'm working on project and im on number 2, i have and issue with the toggling and I can't seem to get that too work. document.getElementsByClassName("buttons")[1].onmousedown= function(){ colorchange(); }; } function colorchange() { /*var background = function blue(){document.getElementsByClassName("buttons")[1].style.border;*/ if (getElementsByClassName("buttons")[1].style.border == "5px #c90 solid") { document.getElementsByClassName("buttons")[1].style.border="5px blue solid";...

jQuery won't toggle css property?

javascript,jquery,html,css,toggle
I know there are tons of jquery css toggle threads, but I took my own approach, and I can't see why this doesn't work: <script> $("#id").click(function(){ if($("#example").css("visibility"=="hidden")) { console.log("if reached"); $("#example").css( "visibility", "visible" ); console.log($("#example").css("visibility")); } else { $("#example").css( "visibility", "hidden" ); console.log("else reached"); console.log($("#example").css("visibility")); } }) </script> Tried it...

Chrome extension which toggles On and Off

javascript,html,google-chrome,google-chrome-extension,toggle
I'm trying to make an extension which would toggle another specific extension on and off. However, I tried over and over and didn't find a way to make it work. Basically, my extension brings a popup with a on/off switch (a checkbox) and I need to make it so that...

Clear toggle() on different screen size

jquery,responsive-design,toggle
I have a link that I want to reveal more content on click, but only on mobile screen. I am using resize and load function to determine the screen size, however when I resize to small screen then to big screen and I click the link it still toggles, its...

Uncaught SyntaxError: Unexpected token else, stumped

javascript,jquery,css,toggle
so I'm making a nav menu that has a slide toggle. I want the toggle button to hide when the menu is open but I still want it to occupy the space so as to not mess up formatting. My javascript code is as follows: (function() { $('.menu-toggle').bind('click',function() { $('body').toggleClass('menu-open');...

fadeIn() not working after hide(), hide() not reaching .done()

jquery,toggle,fadein,fadeout
I have a problem with fadeIn() refusing to work after hide() or fadeOut(). I am trying to toggle a div (#content) with a fade animation. On first glance, it seems to work but when trying to toggle a second time, things break. I'll try to describe how the error occurs:...

How do I toggle an object and make it permanently visible after scrolling?

javascript,jquery,toggle,visibility
I've made a site where the first page of my site is a youtube video, I want the navigationbar to be hidden until you hover over it. Once you go to another site I want the navigation bar to be visible at all times. As for now the navigationbar dissapears...

Jquery Toggle Button image and Div Show/Hide

jquery,css,toggle,nav
I'm trying to create a toggle button image that also show's and hides a div. This is working: //html <body> <header> <script> $(document).ready(function () { $('a#button').click(function () { $(this).toggleClass("down"); $("nav").show("slow"); }); }); </script> <a id="button" title="button"></a> <nav style="display: none"> <ul> <li>NAV</li> </ul> </nav> </header> </body> //css a { background-image: url(../images/menu_on.gif);...

Toggle only this item

javascript,jquery,html,toggle,slidetoggle
i've a problem to toggle only (this) 1 'card' $('a[rel="toggle_comments"]').click(function(){ var div = $('.comments'); $(div, this).slideToggle('slow'); }); <!-- This is a example code --> <section> <div class="mainclass"> [...] <div class="select"> <a href="#" rel="toggle_comments">Test</a> </div> </div> <ul class="comments"> <!-- Content --> </ul> </section> <section> <div class="mainclass"> [...] <div class="select"> <a href="#"...

Hide a toggle whenever I click outside the menu or click on any menu item using jQuery

jquery,html,css,toggle
I have created a toggle window on the left side of a web page. I want to hide the toggle window whenever I click on any anchor tag in a menu or click outside the menu bar. I have uploaded my code in JSFiddle. The relevant code is below. http://jsfiddle.net/66db9vec/...

Jquery toggle jumps

jquery,toggle,slidetoggle,togglebutton
Could someone tell me a solution for this issue? As you can see, the div "jumps" when using the Toggle function. http://codepen.io/AndrewRed/pen/vErjob?editors=101 <p>Text above animation</p> <input type="button" class="btn" Value="Animate"/> <div id="animate"> <p>Text to animate</p> <p>Text to animate 2</p> </div> <p>Text below animation</p> $("input").on('click', function(){ $("#animate").toggle('slow'); }); ...

toggle search input when mouseenter a div, then hide search input when mouseout

jquery,forms,toggle,mouseover,mouseout
I'm using a searchform on my website (I can't change the HTML structure as it's the searchform generated by Wordpress). I have a search icons, and my searchform is hidden. when mouseenter the search div, I want to toggle my searchform, the searchform stay visible when entering text inside, and...

Toggle in php while loop

javascript,php,toggle
My search script list 10 Mp3 result from Myql using while. I want open player when user click "play" button, after that text changed in to "stop". Every thing working fine following script.. But it work only first result if i click other relust that also open first result only......

How to fadein and fadeout a Div with a close button?

jquery,html,toggle,fadein,fadeout
Hello fellow Brainiacs! I've tried everything I possibly can. Hopefully one of the many JQuery experts out there can help me out. Take a look at my JsFiddle HTML: <button type="button" id="aboutbutton" class="btnblue">About</button> <br /><br /> <div id="contentboard"> <button type="button" id="closebutton" class="btnclose">X</button> <p> Hello World!<br /> Hello World!<br /> Hello...

jQuery Animate to auto height, close back up to set height

jquery,jquery-animate,toggle,slidedown
I have a slide Down toggle div which contains a title, content and a toggle open button. I've set up a fiddle but the div currently closes up completely preventing you from opening again. The height i'd like the div to close up to is the height of the title....

Using a cookie to save the state of a toggled division

jquery,cookies,toggle
While I've found essentially the same question asked a number of times here and on other sites, I've spent hours and hours trying to get those answers to work on my site to no avail; I'm just plain stumped. Possibly because I'm fairly new to Javascript, self-taught, and I'm doing...

Why is my “valid” JS code not working?

javascript,toggle
I'm working on learning javascript, with a particular interest in toggling elements from being visible to not visible. I found a tutorial online, which works when I try to run it from my home server. But when I strip the code of everything fancy to just the bare basics, it...

jQuery-function to toggle class exists twice, but only works once

php,jquery,css,toggle
I have one index.php page, whose content changes whether you activated a session or are logged out. When users are logged in, a click on the link "showhide" should show the class "users". When users are logged out the link "showhide" is hidden and instead the link "showhide2" is visible,...

JSF too many commandLinks (h:form) lead to ViewExpiredException

jsf,richfaces,toggle,commandlink,viewexpiredexception
I am having a JSF application which creates and presents about 50 reports. These reports are rendered PNGs and under the pictures a table is displayed. This table uses a RichFaces 4 togglePanel with switchType="client". The togglePanel is just for collapsing and expanding the table. <h:form> <rich:togglePanel id="#{param.reportWrapper}_togglePanel" stateOrder="opened,closed" activeItem="opened"...

why is this accordion toggle not working?

javascript,jquery,html,css,toggle
I just found this script online. but when I insert it in my code, it is not working. when i click on the the accord-header the accord-content is supposed to "slide out" or just to change from visible to not visible. Do I use false syntax or where is the...

JQuery's toggle function is affecting too many elements

javascript,jquery,css,click,toggle
This is what should happen: When I click an image '.post-text' should appear, then - when I click the image once more - the image disappears. All this happens in the toggle function but I have simplified it here. This is what actually happens: When I click one image, the...

Toggle class with jQuery and CSS clashing

jquery,css,media-queries,toggle
I've got a class, lets call it "responsive-table," where I have a media query to remove visibility when you reach a certain threshold on your resolution: .responsive-table { display: block; } @media screen and (max-width: 600px) { .responsive-table { display: none; } } When on a screen less than 600px,...

Leaflet: Toggle GeoJSON layers with Checkboxes in custom sidebar

toggle,leaflet,geojson
I have a custom sidebar sitting on top of my map. Within the sidebar are checkboxes: <label><input type="checkbox" name="points" value="addressPoints" /> COUNTY</label> I would like the map to load with none of the GeoJSON layers pre-loaded and the functionality to toggle a layer on by clicking the checkbox. Below is...

.toggle() does not work with IE9

jquery,internet-explorer-9,toggle
I want to show some information when hitting a link as you can find here: http://jsfiddle.net/t4f8yer0/1/ html: <a href="#" class="more">show more</a> <br> <div class="toggle"> this is more </div> js: $(document).ready(function(){ $(".toggle").css('display','none'); $( ".more" ).click(function() { $(event.target).next().next().toggle( "slow" ); }); }); This works for chrome and IE edge but not for...

Jquery Toggle in Wordpress

jquery,wordpress,toggle
I'am working on a Team member page in Wordpress. This team member page should be automatically filled when new members are added. I used the plugin CPT UI and this works great. The content is hidden so that only images are beeing seen on the team page. Works fine. But...

Toggle groups based on a parameter

sql,sql-server,visual-studio-2012,reporting-services,toggle
I have a reporting requirement in which I have 3 groupings Group_1 parents -> Group_4 lowest child I have a groupingID param which is an int that I'm using to show the same report either as region/div or emp/supervisor. Group_1 =totals and Group_4 = Employee and NULL for region/division. Updated...

How can I manage the dimansions of #homeSub in CSS so it won't diappear when I move my mouse from homeBox to homeSub?

jquery,css,drop-down-menu,toggle
when I hover over #homeBox, #homeSub appears. But when I want to move my mouse to click on #homeSub it disappears. I know that it should naturally appear and disappear as a toggle effect but I need to fix the position so #homeSub will only disappear when I move the...

Why is the javascript slidetoggle function not staying open?

javascript,php,jquery,toggle
I have a link on a page that toggles the search form on and off. For example you search for Spring term classes and then you want to search for a new term and click Start a new Search. The link works great and toggles just fine...EXCEPT the toggle automatically...

Hide and show when click a button

javascript,jquery,html,css,toggle
I have code like this (HTML/CSS/JS): $('.subnav__right li a').click(function(e){ e.preventDefault(); var $this = $(this).parent().find('.subnav__hover'); $('.subnav__hover').not($this).hide(); $this.toggle(); }); $(document).mouseup(function (e) { var container = $('.subnav__hover'); if (!container.is(e.target) && container.has(e.target).length === 0) { container.hide(); } }); .subnav__hover{ display: none; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <div...

How to iterate through items in a class in jQuery

jquery,loops,toggle,iteration,show
I am looking to create a series of text boxes, one will appear after the other. My set up is that I have all the boxes created (HTML) and hidden (jQuery). I had it working for a predefined number of boxes (code for each was written using ids etc) though...

Jquery - Disable INPUT Based on Checkbox

jquery,checkbox,input,toggle
I have form that has numerous checkboxes and input field. Each 'pair' of checkbox & input have the same name, but the checkboxes name is prefixed with u_ eg: <input type='checkbox' name='u_id'><input type="text" name="id" placeholder="ABC123"> <input type='checkbox' name='u_name'><input type="text" name="name" placeholder="Martin"> I'm trying to work out how to disable in...

Why this mobile navigation toggle not working properly?

javascript,jquery,css,jquery-mobile,toggle
I am trying to create a mobile navigation (toggle type) on a breaking point 768px. My mark up is: <div class="tm_menu_mobile"> <div class="menu_icon"> <div class="three_line"></div> <div class="three_line"></div> <div class="three_line"></div> </div> <div style="clear:both;"></div> <div id="nav"> <div class="navigasi_menu"> <div class="navigasi_list"> <div class="nav-menu"> <ul> <li class="page_item page-item-7"><a...

Jquery menu - toggle sub-menu area and css state change on parent menu button

jquery,css,toggle
Apologies if this is very easy or I've missed the point... From searching stackoverflow, I've combined two very helpful segments of code, but I have a weird outcome. I have a menu with 3 parent buttons - each time one of those is clicked, I'd like it to open a...

Remove a toggle class when clicking another toggle link

javascript,jquery,html,toggle
I am making a tumblr theme and have managed to have 3 toggle links. They are working fine but I was wondering if it were possible to make it so the if the first toggle link is open, and i click on a second toggle link, the first one will...

Toggle script automatically rolled up

jquery,toggle,slidetoggle
I have a code <script> jQuery(function($) { $('#toggle1').click(function() { $('.toggle1').slideToggle('slow'); return false; }); $('#toggle2').click(function() { $('.toggle2').slideToggle('slow'); return false; }); </script> <a href="#" id="toggle1">header1</a> <div class="toggle1" style="display:none">content1</div> <a href="#" id="toggle2">header2</a> <div class="toggle2" style="display:none">content2</div> What should I modify to get a result when you click on the first title...

AngularJS, ng-repeat, checkboxes and toggleAll

angularjs,checkbox,angularjs-ng-repeat,toggle,ionic-framework
There's no question. Searching over the internet, you can easily find examples with how ng-repeat and checkboxes work. All these examples include only few checkboxes. But, have you tried to create several hundred checkboxes, then use some toggle button to check/uncheck all checkboxes? The app becomes totally unresponsive. In browser...