Hide An Element If I Click Anywhere On The Page?
Aug 6, 2011
how do i hide the popup list.. i would like to if the user click outside of that div element.. the popup div will hide. but whenever i select the body or the id containing that popup div.. the whenever i click the down arrow button.. it shows the popup div.. but then closes again.. because of the selector hide on the container div.[URL].. here's the test page..
when i click the down arrow.. it shoes the popup.. how to do if i want that any click outside that popup element.. i will call the hide/fadeout for the popup element..
View 1 Replies
ADVERTISEMENT
Dec 15, 2009
Does anyone know what's wrong with this code because when the page loads, the link is not being hidden
window.onload = setTarget;
function setTarget()
{
var theLinks = document.getElementsByTagName('a');
for(var i = 0; i < theLinks.length; i++)
{
if(theLinks[i].getAttribute('href') == '/subjects/new')
[Code]...
View 3 Replies
View Related
Oct 13, 2011
I have small online shop and in the top section I have a mini cart, which a user can click on and expand an area to see what products they have added to their cart.
The problem I am having is that for a brief moment when the page initially loads the expandable area becomes visible until I the .ready (hide) function kicks in. Is there any way that I can actually hide the cart on page initialisation so its not visible even for a brief moment?
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){
jQuery('dl#mini-cart> dd').hide();
[Code]....
View 4 Replies
View Related
Mar 22, 2008
Do u know of any free javascript script that will popup as a bubble with some information on it when I click on any form element in a page?
I can show you an example of what I want:
View 3 Replies
View Related
Mar 30, 2011
I have questions related to three operations using jQuery:refresh a div element on page lo append an element on top of the other elements in div change an image (pending/accepted) from the div's elements I know that there are tutorials for that, but i am so short in time.I just finished my PHP courses, and i am too tired to get into the jQuery magic right now.ere is the situation that i am confronting. I have to files: propune.php (which is basically the page that has the form and the div that should be refreshed/appended) and propuneri.php (the file that is handling ajax calls).
propune.php
(partial) http://pastebin.com/SFJ7zSRJ
propuneri.php
[code].....
View 1 Replies
View Related
Mar 31, 2010
i am working on a custom drop down list that has hidden #options DIV which is shown when the user clicks on a button. the problem i am having is that the click event does not seem to be attached to the LI elements since they are hidden when the page first loads. if i show the #options DIV when the page loads everything is working as expected.i've tried to attach the click event after i show the hidden UL but that didn't work either.what can i do to make sure the LI click event fires? i tried to put A tag inside of LI and attach click to that but to no avail.
<style type="text/css">
.gbtn-options {
overflow-y:auto;[code]....
View 6 Replies
View Related
Mar 8, 2010
What I've doing wrong, on first click it detects that the div is hidden and makes it visible, button on second click it does nothing:
View 1 Replies
View Related
Aug 15, 2011
I have this code:
$
(
'#region_dc').
click
[code]....
The click works fine. Check the checkbox, the hidden div displays. But when I uncheck the checkbox, I want it to go away.
View 3 Replies
View Related
Jun 22, 2009
It is possible to make a script that hides the element clicked and this way hide the items I want.
View 1 Replies
View Related
Mar 30, 2010
I have some existing code that I need to alter so that when the user clicks outside the element, the element disappears. I have looked at other show/hide element code, but I'm not sure how to integrate it with the script below.
There's a date form, with an calendar image icon. When you click on the calendar icon, a div with a calendar opens. Then you can click on the dates, that when clicked will fill out a textfield with the date.
The form code:
Code:
<div class="TSearchBox">
<div class="TSearchBoxDate">
<span class="normal TLabel">Frn: </span> <input name="TLfd" type="text" value="2010-03-30" />
<img src="images/datum.gif" class="TCalendarImage" alt=""
[Code]...
View 1 Replies
View Related
Jul 29, 2011
I`m trying to make selecting an select list option (as it become when we click on it)by clicking on a special pseudo element.I`m trying to do it in this way:
<script>
$(document).ready(function(){
$(".psevdo-checkbox").each(function(){
$(this).click(function(){
[Code].....
View 6 Replies
View Related
Apr 29, 2010
I am working on a e-commerce site and I need to hide the checkout link (<a>) if the value of of the element (<td>) holding the amount due ="$0.00".
<tr
>
<td
colspan
[code]....
View 2 Replies
View Related
Dec 24, 2006
So basically I want to make a side navigation that has a button that can hide the whole layer (making more room for text). Saw it done before but forget how it was done. More info:
Along the side of that div is the button to hide the div, i know that that will be in its own div, that will have a script to hide (or somehow change a value in the css) to make the side bar and its conetent not visible.
View 4 Replies
View Related
Jul 25, 2011
The issue is that I want to hide a div tag once click anywhere else, exactly like Jquery UI Datepicker.
View 12 Replies
View Related
Jul 21, 2010
I am programming a website. On there website the users will be able to click "Add as friend". I am basically wanting it so that when my users click "Add as friend" the link will dis-appear and then it will visit a page on the iframe that I have already coded with a variable (addfriend.php?pid=CODEHERE).
If there is anyone that knows how I can make the code dis-appear using Ajax.
View 2 Replies
View Related
Sep 2, 2009
I'm using the <div> command, but I would like that, when the page opens, this <div> is closed.
The main goal is that the user can open this <div> with a button.
View 2 Replies
View Related
Jul 5, 2006
I know how to click a link to show a hidden div. However, how can I hide the div when users click anywhere in the browser? I would like some behaviour like "releaseOutside" in javascript.
I search this forum and find some code to try, but it doesn't work. When I click the link, the div does not show anymore (if I took out the document.onclick function, the div shows). Here is my code:
<script language="javascript" type="text/javascript">
function showdiv() {
document.getElementById("mydiv").style.display = "block";
return false;
}
document.onclick = function() {
document.getElementById("mydiv").style.display = "none";
}
</script>
</head>
<body>
<a href="#" onclick="return showdiv()">Link</a>
<div id="mydiv" style="display:none">bah bah bah...</div>
View 2 Replies
View Related
Aug 12, 2011
I have a link, and a onClick event, which calls jscript function.
Everything is okay, but how can i for example hide that link on click ?
I mean, i can do onClick = "this.hide()" or link.observe('click', function() { ... I can acomplish it this way, but can i do it with a function ?
Because, on click,a function does ajax reuqests, and i want that function to hide the link, not with inline code, or with some observe actions..and after that request, i want to hide the link.
View 3 Replies
View Related
Feb 20, 2007
Alright, I got the basic idea (which is relatively easy):
function show_el(id)
{
var obj = document.getElementById(id);
obj.style.display = "block";
}
function hide_el(id)
{
var obj = document.getElementById(id);
obj.style.display = "none";
}
The problem is, you need 2 different links, one to show the element, one to hide it. What I want is one link that changes depending on whether or not the element is showing: If it's showing, the link will be "Hide Element", if it's not, it'll be "Show Element."
I've seen this done a lot, mainly in expanding/collapsing, which is basically what I'm doing. I imagine it's not all that hard, but I just can't seem to figure it out.
View 2 Replies
View Related
Jul 8, 2011
Code...
I want the second element to show/hide when the first element is clicked on, what would the easiest way to do this with javascript
View 10 Replies
View Related
May 14, 2011
I want to have a couple of links like
'Link1' >> opens box1
'Link2' >> opens box2
'Link3' >> opens box3
The boxes are not closing good?
I have this code but something is going wrong:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[Code].....
View 1 Replies
View Related
Nov 19, 2010
I want to hide a table when user click on a link
this is my code looks like code...
is it possible to hide above table at same time print this link clicked?
View 2 Replies
View Related
Oct 2, 2010
I'm skinning my video player for my new site, I have the following code: click:function(){a.trigger("togglePlay");return false}}) How can i edit this code to add a SECOND function of making the button opacity: 0 or just dissapear alltogether once clicked aswell?
View 2 Replies
View Related
Nov 16, 2005
I've already posted a question related to this but i'm not getting the desired solution.U people might have seen the search this forum link in this forum.On clicking that link a div layer opens and if I click the mouse anywhere outside this layer it suddenly hides.I'm using a similar layer function in my site.By clicking a link in my site a layer opens and if I click my mouse outside the layer it should be hidden.So how to do this using javascript.
View 13 Replies
View Related
Aug 3, 2011
I'm trying to hide() show() an element when a specific checkbox is checked, the checkbox is nested within an asp Panel which is nested within a Web User Control.When the user control is loaded, the checkbox's id changes to the panel id + the checkbox id due to the face that i have an unknown number of user controls that can be added to the same aspx page.I need a way to hide a textbox when the checkbox is checked without using the '#controlId' syntax, and when i pass the txt.id its not working:
toggleMe: function toggleTest(ID) {
var elem = document.getElementById(ID);
var parentId = $(elem).parent().parent().parent().parent().attr("id");
[code]....
View 1 Replies
View Related
Jul 2, 2009
I am wondering if someone could give me a quick hand with some php im trying to edit in Wordpress.
Heres the original peice I am trying to edit:
What I want to do is when "the_author" equals "admin" for the div to be hidden or deleted.
I have added this to make sure that it can find admin
My question I guess would be is there a statement that would be able to hide/delete the div? Or should I be re-writing this code, like this...
View 2 Replies
View Related