show-hide

How to change a text box to visible depending on what item is selected in a drop down menu?

旧街凉风 提交于 2019-12-23 05:22:57
问题 I have a drop-down menu with a list of school subjects in it, the last option is "Add New Subject" so when the user selects that option, I need a text box to appear. My HTML form looks like this: (I have only included the relevant bits, there is a bit more stuff on it. <form method="post" action="createQuestion.php" name="cq"> <select name="subject" id="subject"> <option value="biology">Biology</option> <option value="maths">Maths</option> <option value="economics">Economics</option> <option

Making a simple jQuery carousel

被刻印的时光 ゝ 提交于 2019-12-23 05:09:39
问题 I'd like to make a very simple jQuery carousel, that advanced via a set of controls "back" | "forward", and loops infinitely. Seems like all the ready made ones have way more features than I'd like. The structure I have now looks like this. HTML: <section id="content"> <a class="back">Back</a> <a class="forward"/>Forward</a> <article> <p>Lorem ipsum</p> </article> <article> <p>Lorem ipsum</p> </article> <article> <p>Lorem ipsum</p> </article> </section> The first one in the stack is the

deminiaturize NSWindow without making it key

感情迁移 提交于 2019-12-23 04:58:16
问题 I have main window and several child windows, i would like to show main window when user click on dock icon, but without making it a key window, if there just was one (it will become automatically key if there is no key window). Here is current code: if ( fMainWinDelegate ) { if (not [NSApp keyWindow]) { NSLog(@"AppDelegate::applicationShouldHandleReopen [fMainWinDelegate showWindow]"); [fMainWinDelegate showWindow]; } else { if ([fMainWinDelegate.window isMiniaturized]) { NSLog(@"AppDelegate

I want to toggle the table rows filter based on the text from buttons

只谈情不闲聊 提交于 2019-12-23 04:22:29
问题 <button id="btn">Car</button> <button id="btn1">Bike</button> <table id="vehicles"> <tr> <th>Type</th> <th>Color</th> <th>Wheels</th> </tr> <tr> <td>Car</td> <td>Red</td> <td>4</td> </tr> <tr> <td>Motorcycle</td> <td>Green</td> <td>2</td> </tr> <tr> <td>Bike</td> <td>Blue</td> <td>2</td> </tr> <tr> <td>Car</td> <td>Blue</td> <td>4</td> </tr> <tr> <td>Bike</td> <td>Green</td> <td>2</td> </tr> <tr> <td>Motorcycle</td> <td>Red</td> <td>2</td> </tr> </table> <script> $(function () { $("#btn")

Show DIV if 2 specific Checkboxes are checked, if only one checked show different DIV

南楼画角 提交于 2019-12-23 03:11:25
问题 What I want to achieved is a way to show a div if 2 checkboxes are checked and show something else if only one is checked else if 3 checkboxes are checked show a different div once again. I'm trying to have a working version of it.... Any help? Take a look to this example: http://jsfiddle.net/downloadtaky/FpF7T/ 回答1: Change the markup to <table> <tr> <td><input type="checkbox" name="opzioni" data-grp="vano1gop1" value="van ass obb 1g op1" class="opzioni" />Opzione 1</td> <td><input type=

Using Jquery to hide form elements based on selected dropdown option

戏子无情 提交于 2019-12-23 02:44:11
问题 I have a form that has a dropdown menu, a few text fields and a text area. I would like the form to hide the text area if one of the options from the dropdown menu is selected. Here is my code: <form id="contact" name="contact" action="" method="post"> <select name='select-question'> <option value="member-request">Become a member</option> <option value="question">Send us your questions / comments</option> </select> Name: <input type="text" name="last-name"></input> Comments/questions:</br>

jQuery Hover Menu disappears when right click

Deadly 提交于 2019-12-23 02:16:56
问题 I have a Menu that opens when hovering. But on right click the menu disappears when the contextmenu opens. But I can't figure out why. I need the hover menu open at the same time with contextmenu/right click. The jQuery Code (Version jquery-1.11.2.min.js) : jQuery(document).on('mouseover','#main_menu',function() { jQuery('#main_menu_inner').show(); }); jQuery(document).on('mouseleave','#main_menu',function() { jQuery('#main_menu_inner').hide(); }); The HTML: <div id="main_menu"> <img id="menu

Making jQuery display the correct sub-menu, when present

懵懂的女人 提交于 2019-12-23 01:12:33
问题 this is my first post here so I apologise in advance for any poor practise. I've been searching for a while, but haven't come across a solution that fits my needs as yet - maybe I'm just doing it wrong. But here goes: I'm building a site using the Big Cartel CMS and have delved into jQuery for the first time. I'm trying to create a horizontal and centred navigation menu that will display a sub-menu underneath, where appropriate. I'm fine with html and CSS, but am struggling with the jQuery.

Angular Hide With Button

丶灬走出姿态 提交于 2019-12-22 08:08:04
问题 So I'm working with angular and I'm trying to make a button that when clicked disappears. i have tried to use [hidden], (click)="showHide = !showHide", and a bunch of other methods. nothing is working so far. my html (currently): <div class="rows"> <div class="a-bunch-of-styles-for-my-button"> <a type="button" class="more-styles" (click)="inboundClick = !inboundClick" [routerLink]="['/inbound']" href=""> </a> </div> </div> and my component: export class AppComponent { inboundClick = false; }

Changing font awesome icon onclick function

让人想犯罪 __ 提交于 2019-12-21 19:41:20
问题 I'm trying to swap .fa-eye to fa-eye-slash when user click on a button. What am I doing wrong? It's not working. HTML code: <button onclick="arata_ascunde(this);" style="align:right;font-size:13px" class="btn btn-info " id="show_hide_bt" style="background-color:#00b0ff;"><i class="fa fa-eye"></i> Show</button> Javascript code: function arata_ascunde(button) { var x = document.getElementById('showhide'); var change = document.getElementById("show_hide_bt"); if (x.style.display === 'none') { x