How To Link To A Page With Different Default Show / Hide Tab Showing

Aug 2, 2009

I'm not allowed to post a link yet since I'm a newbie. But the page is here: tinyurl dot com /m8ajyp

This page (and others on the site) use javascript to show/hide some divs in order to have a tab-like interface.

Is there any way to link to this page with the "Past Events" div showing as the default? Right now you can see that "Coming Events" shows on page load. And that's the way we want it most of the time.

But there are places in the site where I'd like to link specifically to this page with the "Past Events" div showing on page load.code...

View 7 Replies


ADVERTISEMENT

Show/Hide Div With Default?

Jul 16, 2009

I'm trying to make one div default open, and that is working ok, but when I hit the link for the the other div to open, the first div is not closing... It closes when I hit the link for the first div...

var currentShowingDiv = document.getElementById('idShowHide1');
function doHideShow3(divName){
var objDiv = document.getElementById(divName); [code]...

So just to clarify what I want is to have one div open as default (idShowHide1) and when the user hits the link for the second div (idShowHide2) the first div close and the other open... As it is now the first div does not close...

View 5 Replies View Related

Show <div> As Default Then Hide It

Mar 31, 2005

The code below allows a user to specify which <div> should show on page2.html depending on which link is clicked from page1.html.

Page1.html
<code>
<html>
<head>
<title>page 1</title>
</head>

<body>

<a href="page2.html?div1">show div 1</a><br>
<br>
<a href="page2.html?div2">show div 2</a>

</body>
</html>
</code>

Page2.html
<code>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>page 2</title>
<style type="text/css">
.show
{
visibility:visible;
}
.dontshow
{
visibility: hidden;
}
</style>

<script type="text/javascript">
function wp(){
var fn1=window.location.href
var fn2=fn1.split("?")
if (fn2.length>1){
var fn3=fn2[fn2.length-1]
x=document.getElementById(fn3);
x.className="show";
}
}
</script>
</head>
<body onload="wp()">
<div id="div1" class="dontshow">Div 1</div>
<div id="div2" class="dontshow">Div 2</div>
</body>
</html>
</code>

What I would like to do is have page2.html <div1> as the default and show up. Problem is, if I click the link to show <div2> from page1.html, both <div>'s show up. How can I hide <div1>?

View 1 Replies View Related

Show / Hide Div With Default?

Jul 16, 2009

I have this script which show and hides divs, but I want a certain div to be open at start, how can I do that?code...

View 7 Replies View Related

JQuery :: Checkbox Hide/Show Default Display?

May 26, 2010

Assuming that a checkbox is initially unchecked, the following code works because the additional text is hidden, and when the checkbox is checked, the function if performed to show() it. However, what needs to be done if the checkbox may or may not be checked initially?

.additional{ display:none; }
$('#add').change(function(){
if($('#add').is(':checked')){[code]....

View 2 Replies View Related

Hide:Show Text - Making 1st Bit Hid When Showing 2nd Bit

Mar 23, 2011

Apologies if this question has been asked a million times. I am fairly new to this game, have got my head around html & css and now it's time to add a little interactivity... BUT i've hit my first brick wall. I am setting up a (big) panel of text which i wish to present in a more reasonable fashion by hiding the content and only showing the headers. Got the Hide:Show function working ok as shown below, but I am stuck on my next requirement...

Basically The hidden text will show and hide when told by clicking on the relevant header - but i wish to hide the text in a visible area when clicking on a new header.

[Code]....

View 3 Replies View Related

Divs Hide / Show Form Elements Showing Thru..

Sep 9, 2005

I'm doing a page w/lots of divs that I set to visibile or hidden dynamically using getElementById.. the divs are all forms... sometimes elements in a hidden form show thru on a visible form.. how can I fix this..

View 5 Replies View Related

JQuery :: Menu FadIn - Show - Hide - FadeOut - Make The Content FadeIn Instead Of Just Showing?

Dec 4, 2011

It is not possible for me to make the content1,2,3,4 fadeIn instead of just showing. When i type 'slow' here content disapear:

[Code]....

View 2 Replies View Related

Show / Hide DIV According To Link URL

Mar 4, 2009

I am pretty new to JS but I've managed to create a function to show and hide a div according to a link's URL, but I am gonna have lots of url's and lots of div's to show and hide, its not a problem to show and hide them, the only trouble is that they stack, if I show div 1, and then press link 2 to show div 2, Div 2 is gonna be below div 1, and what I want is that when I click link 2 to hide div 1 or any other shown divs, I am sure its possible but i don't know how to do it. I think it would be possible by storing the id of the div in a variable, but the only problem is that when I call that function, the variable always changes so it would be a matter of storing the id in a variable outside the function, but i don't know how to do that, or what are the rules?

This is my code:
JS
function showHide(product) {
var el = document.getElementById(product);
el.className = (el.className == 'hide') ? '' : 'hide';
}

HTML
<div id="1" class="hide">Content of Div 1</div>
<div id="2" class="hide">Content of Div 2</div>
<a href="javascript:showHide('1');">Show Hide 1</a>
<a href="javascript:showHide('2');">Show Hide 1</a>

CSS
.hide {
display:none;
}

I need to have the javascript function call in href because of an applet I am using. In resume, the divs are hidden at the start, when I click one link, the div shows, when I click the other link I need the previous div shown to be hidden (class="hide"), and show the new div and so on.

View 4 Replies View Related

JQuery :: Default Content To Show On Page Load

Jun 23, 2011

I'm using Dynamic ajax content to load .php files into a div section, and everything is going fine, but the only problem is I don't know how to have the index page to load a certain file when the page loads. As for jquery code, this is all I have regarding my problem, and I'm not even sure I've used it right:
$(document).ready(function() {
$.get("content/home.php", function(returnedData) {
$("index").php(returnedData);
});});

View 2 Replies View Related

Hide/show Link Like Rapidshare

Jun 29, 2006

just wondering, anybody has script/tutorial that does the show link after 45 seconds like rapidshare? There's a counter and after 45 seconds it displays the link.

View 1 Replies View Related

JQuery :: Show / Hide Link Div?

Apr 13, 2009

I have multiple divs called article which have a show/hide link to toggle a div inside called articleBody. Problem is when I click the link all divs show/hide. The html structure is below:

<div class="article">
<p class="show"><a href="#">Hide [-]</a></p>
<div class="articleBody"><!-- Stuff i need to hide on click</div>
</div>

how I can toggle the text to say show/hide as well as just closing that one instance of div article rather than every instance on the page?

Thanks</textarea></p>
<input type='hidden' name='ID[4]' value='206852' />
<input type='hidden' name='URL[4]' value='http://forum.jquery.com/topic/direction-please-show-hide-from-single-link' />
<input type='hidden' name='CAT[4]' value='JQuery' />

[code]....

I have 11 elements with long description of each element of them. I decided to display the elements on the sidebar and the description of each one of them will be displayed on the body directly when the user clicks on the element.but the problem with this one is put the content (or description) inside the javascript code, and I want the description be on the HTML code to make it later on flexible for changes by the admin after putting the data including the description of these elements on the database instead of hard-coded style.

View 4 Replies View Related

JQuery :: Hide And Show Elements With Same Link?

Jun 16, 2011

$('a.showContent').click(function(e) {
e.preventDefault();
$(this).each(function(i) {
$(this).parent().parent().find('.hide').slideDown();

[code]...

is also not doing it..how do I hide elements with same link that I used to show them?

View 4 Replies View Related

JQuery :: Show Hide 'td' On Click Of A Link?

Feb 12, 2010

I have a table that contains information that is hidden within a 'td' element. Users can access this information if they wish by clicking on a link that is held in another 'td' element on the previous row (table structure below):

<table>
<tr>
<td><a href="#" class="install_toggle"

[code]....

View 1 Replies View Related

Show/Hide Link PLUS Text Change?

Jan 11, 2010

I can I take a code like this:

<script language="javascript">
function toggle() {
var ele = document.getElementById("toggleText");

[Code]....

But make it so you see "Show" before you click, then change the text to "Hide" once you click the link?

View 12 Replies View Related

Link Preview Show / Hide Div / Iframe

Sep 1, 2011

There are various widgets and plugins that show link preview via tooltip or iframe,So as I am trying to continuously improve web sites experience with new trends and web functionalities - thus it come the task for uniform link preview via div and iframe.

View 14 Replies View Related

Link Click To Hide / Show Series Of DIV

Jan 1, 2011

I'm basically trying to make it so a link click will hide and display a series of DIVs to make my site look a bit neater and more professional. The code I have WORKS, it can make a DIV appear and disappear easily enough but the issue I'm having is that it only works if you click the same link to show nad hide. Click a link to show a DIV then click another link and both will be visible.

But the only other code I tried to hide all but the selected DIV just results in my page becoming invisible (Its constructed with DIVs from top to bottom) so its not a suitable result. I'm basically after this: [URL]. Where you click on the link (in this case an image) and it shows what you need. I did try searching through their HTML and code but their javascript file appears as one long string to me so its hard to find any real useful detail.

This is the code I have at the moment:
Code JavaScript:
function showHide(shID) {
if (document.getElementById(shID)) {
if (document.getElementById(shID).style.display != 'block') {
document.getElementById(shID).style.display = 'block';
}else {
document.getElementById(shID).style.display = 'none';
}}}

And this is my current page in practice. [URL]. I'm assuming I might need an array but I need to stop it picking on every DIV and only the DIVs in my content area.

View 6 Replies View Related

Show/hide Multiple Elements With One Link Using Javascript

Oct 14, 2005

How can i do this i already have a function to show/hide elements with one link but how can i show/hide multiple elements

Here is the script:

function obj_ref(object)
{
if (document.getElementById)
{
return document.getElementById(object);
}
else if (document.all)
{
return eval('document.all.' + object);
}
else
{
return false;
}
}

function obj_toggle(object, open_close, open_text, close_text)
{
var object = obj_ref(object);
var icone = obj_ref(open_close);

if( !object.style )
{
return false;
}

if( object.style.display == 'none' )
{
object.style.display = ''
icone.innerHTML = close_text;
}
else
{
object.style.display = 'none'
icone.innerHTML = open_text;
}
}

View 4 Replies View Related

Show/hide Certains Divs When A Link Is Clicked?

May 23, 2011

I need to show/hide certains divs when a link is clicked.These are my divs:

div1
div2
div3
div4
div5

I will have several links. Depending on which link is clicked it will hide/show several divs simultaneously For example, if link1 is clicked it will hide div1, div2 and div3 and show div4 and div5.

View 10 Replies View Related

Toggle Link Text And Show / Hide ID Onclick

Apr 20, 2010

I am trying to create a Link that changes its currently displayed text and also toggles the css.display property from inline to hidden. I'm sure there are solution outs there btu I have not been able to find one that does both functions with one click properly and is also easy to implement for people not as familiar with html and javascript. Obviously I am trying to create a show more, show less type link. currently this often shared code works fine to change the current state of the target ID's css.display from none to inline. My end goal is to be able to not only toggle the display of the LONG1 div but to also change the innerhtml of 'short1' from "Show More" to "Show Less".I am still learning about JS so Im really rough around the edges. I tried some different techniques btu I dont ahev them posted on my work pc.

View 14 Replies View Related

JQuery :: Repeated Show/hide - P.hidden Must Be Closed By A Link Within Himself

Jun 7, 2010

Here's what I want to do:

1. Have a link (p.advert a.toggle) inside p.advert that tells p.hidden to show itself and at the same moment hides that link (p.advert a.toggle).

2. p.hidden must be closed by a link within himself.

3. When I close p.hidden, I need p.advert a.toggle to become visible so that the user can see p.hidden again by clicking on p.advert a.toggle.

4. The code must be reusable many times on the same page.

At the moment I can't get point 3 to work.

View 4 Replies View Related

Show / Hide Div - When The Box Has Been Hidden By The Close Link It Will Not Be Shown By The Links

Jul 20, 2011

I have four links which show a div and when you select another link it closes the current div and shows the new one. I'm trying to add a 'Close' button within the currently open div which obviously will hide the div and allow it to be opened again by selecting a link.

Code:

HTML Code:

My problem is that when the box has been hidden by the close link it will not be shown by the links.

View 2 Replies View Related

Jquery :: Show And Hide Script When Clicked On Link Of Particular Section?

Dec 16, 2011

I have working code to Show/Hide content when clicked on link of particular section:

var showText="Show content FAQ1";
var hideText="Hide content FAQ1";

1. How to do link on particular Title and show this description like Description1, Description2 etc.

2. How to open some sections in advance inside Javascript?

Working code is the following using Jquery jqueryV1.4.4:

PHP Code:

<!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" xml:lang="en" lang="en">[code]....

View 1 Replies View Related

JQuery :: Anchor Link List Show / Hide Content ID On Mouseover

Jun 8, 2011

I have a list item, where only some of the items are linking to a quote from the client. The quotes are in another list, where each list item has an id corresponding to the client link. I want to show the client quote when you roll over the client anchor link. Currently when I mouseover it's showing nothing.

Here's my HTML
<!--client list-->
<ul id="clientList">
<li>no quote Client /</li>
<li><a href="#client1">Client 1</a> /</li>
<li>no quote Client /</li>
<li><a href="#client2">Client 2</a> /</li>
</ul>
<!--client testimonials--> .....

At the moment, when I mouseover one of the anchored client links, the content disappears, so it's not showing the correct client quote <li>.
$(document).ready(function() {
// see if the requested page url contains an anchor '#'
var hash = window.location.hash.substring(1);
// if no anchor, show the default blockqoute
if(!hash){
var id = 'default';
}else{
var id = hash;
} .....

View 2 Replies View Related

Show / Hide Div Layer / Change Link Color / When Radio Button Is Selected

Aug 16, 2010

I am trying to develop an exam system.Find my code below.I request you to copy the code and save it as an html file .I have 2 problems:

1. Kindly notice that when the quiz is loaded,it shows both the questions by default.I want only question 1 to be visible when the quiz loads.What happens presently is that ,both questions are visible even after I click on the link
Q.1( referring to question 1).However,when I click on
Q. 2,then only question 2 can be seen and then(after clicking on Q.2) if I click on Q.1,then only question 1 can be seen

What I want is that when the page loads only question 1 is visible.Then when I click on Q.2,I can see only question 2 and when I click on Q.1, I can see only question 1.I later plan on adding many questions,so it should be a general solution rather than a solution good only for 2 questions.

2.Also,what I want is that,if someone selects any of the answers of a particular question,it's link color should turn green to indicate to the user that he answered that question.So for,instance,if I select an answer to the first question(select one of London,New York,Seattle,Washington,Chicago), the link Q.1 should turn green.

View 3 Replies View Related

JQuery :: Toggle Function - Hide/show Table When Hide/show Button Is Pressed

Sep 12, 2011

I am trying to hide/show table when hide/show button is pressed

Problem: The code works fine when I remove 'slow' from line 10. But with 'slow' in line 10 content of toggleButton doesnt change from Hide to Show when pressed.

Code:

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved