hiding a form depending if its visible or not, :visible check is not working



I have this code to check if a span is hidden or visible depending on the value it will show or hide, the event is triggered when a user clicks a button:


$('form').on('click', '#agregar', function(){
// var p = $('#panel');
//var a = $('#agregar');
if($('#panel').is(':visible')){
$('#panel').hide();
$('#agregar').val('Mostrar Forma');
alert('ocultar');
}else {
//if($('#panel').is(':hidden')){
$('#panel').show();
$('#agregar').val('Ocultar Forma');
alert('mostrar');
}
});

the problem is that even if its visible it will never hide it


View Replies

Related to : hiding a form depending if its visible or not, :visible check is not working


Making a datagrid column not visible/visible depending on a condition
Category : ASP & ASP.net
Hi, I have a datagrid column button for only deletions (intended to delete rows in the datagrid).  I don't want the column to be displayed unless it a user has access rights.  But let's not get into access rights here, I just want a way to make the column visible ="false&a

View Replies


Nice solution for hiding all visible DIV elements on the page, then restoring only the ones that were visible before
Category : Programming Languages

I'm trying to make a jQuery script that will hide all the visible elements on the page,
and then after someone hits a button, make all the elements that were hidden appear again.


I know I can use the .is(':visible') selector on every single divider and store the ones t


View Replies


visible/not visible depending on stage size???
Category : Design Software
visible/not visible depending on stage size???
 
im trying to set an if statement that says
if the stage height is less than 800, then the movieclip is visible, else it's not visible
i thought it would be something like this, but it's not working. Do i need it ins

View Replies


Making text box and check box invisible/visible depending on user action
Category : Development
Hey,
I am trying to do something on one of my forms..
Basically, i have a past and present checkbox, start date and leave date. Now if the user clicks on the "present" checkbox i want the leave date checkbox to vanish and if clicked again i want to re-appear..
Take a look at

View Replies


Making check box/textbox invisible/visible depending on user action
Category : Development
Hey,
I am trying to do something on one of my forms..
Basically, i have a past and present checkbox, start date and leave date. Now if the user clicks on the "present" checkbox i want the leave date checkbox to vanish and if clicked again i want to re-appear..
Take a look at

View Replies


How to get certain fields visible depending on other values in access form
Category : Development
Hello,
Im struggling with figuring out how to have my form auto select certain fields in access 2010.
I only want fields to show up on a form if certain data was entered in a field in a diff form.
Ex, If Form 1 had a selection of fruits (Apples, Oranges, and Blueberries
then I

View Replies


Within VBA telling if a form is open/visible and hiding it
Category : Excel
Have a user form that I would like to show only when one of three types of worksheets are active. I am trying to hide or show the form when the correct type of worksheet is the active worksheet.

View Replies


Hiding a form button - .Visible = False?
Category : VB & VBnet
Hi,
In VBScript, how would I hide a button (or any other element) on a form? I tried with:
VB Code:

View Replies


Hiding Form Contents Not Visible after Done button pushed
Category : Access
:)I am not super experienced in vba, but I appreciate any offers I can get. I have a form that has staff errors as yes/no buttons. What I would like to do is have a button that says "Done entering errors" and then the buttons are locked and the information on the form no longer visi

View Replies


Check Box control is not visible. How to make it visible
Category : Programming Languages

I can't see checkboxes and radiobuttons in my web page. I do not understand where I make mistake. In my first template there is no problem. However after changing template there are problems with checkboxes and radiobuttons.


Here is the code :


<div class="grid_12">

View Replies


2012 / 2017 Copyrights BigHow , All Rights Reserved .