JQuery :: Collapsable Panels With Dynamic ID?
Nov 9, 2010
i just found this jquery script for collapsable panels : [URL] it works fine for me, but the problem is that i have to write all the ID's from the DIV's into the script before. i got a page with a lot auf these panels and i dont want to write every ID in the script. is there any posibility to have only one scipt and when i click one panel it regognize on which i clicked? so i dont want to have the ID's in the script.
this is the script:
$(function()
{
$("#mostrar").click(function(event) {
event.preventDefault();
[Code]....
View 2 Replies
ADVERTISEMENT
Nov 23, 2002
This is a vertical collaps menu I made:
<html>
<head>
<script language='javascript1.2'>
//Scrit Name:Collapsable Menu V2.0
//Created By:Garadon
//E-Mail:Shashalak@hotmail.com
//Homepage:www.the-hive.dk/~donp/
function expand(value)
{
var antal=3;
var i=value;
var move=document.getElementById(i).clientHeight;
if(document.getElementById(value).style.visibility=='visible')
{
document.getElementById(value).style.visibility='hidden'
while(i!=antal)
{
i++;
document.getElementById(i+'t').style.pixelTop=document.getElementById(i+'t').style.pixelTop-move;
}
}
else
{
document.getElementById(value).style.visibility='visible'
while(i!=antal)
{
i++;
document.getElementById(i+'t').style.pixelTop=document.getElementById(i+'t').style.pixelTop+move;
}
}
}
</script>
</head>
<body bgColor=Black Text=yellow >
<table cellspacing=0 cellpadding=0 border=0 id=1t style='position:absolute;left:0px;top:5px;width:150px'>
<tr>
<td colspan=2 onClick="expand(1);" bgColor='#555555'>
<B>
Test1
</B>
</td>
</tr>
<tr>
<td bgColor='#000000'>
<table Border=0 bgColor='#333333' style='width:100%;visibility:hidden' id=1>
<tr>
<td>
Test1
</td>
</tr>
<tr>
<td>
Test1
</td>
</tr>
<tr>
<td>
Test1
</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=0 cellpadding=0 border=0 id=2t style='position:absolute;left:0px;top:24px;width:150px'>
<tr>
<td colspan=2 onClick="expand(2);" bgColor='#555555'>
<B>
Test2
</B>
</td>
</tr>
<tr>
<td bgColor='#000000'>
<table Border=0 bgColor='#333333' style='width:100%;visibility:hidden' id=2>
<tr>
<td>
Test2
</td>
</tr>
<tr>
<td>
Test2
</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=0 cellpadding=0 border=0 id=3t style='position:absolute;left:0px;top:43px;width:150px'>
<tr>
<td colspan=2 onClick="expand(3);" bgColor='#555555'>
<B>
Test3
</B>
</td>
</tr>
<tr>
<td bgColor='#000000'>
<table Border=0 bgColor='#333333' style='width:100%;visibility:hidden' id=3>
<tr>
<td>
Test3
</td>
</tr>
<tr>
<td>
Test3
</td>
</tr>
<tr>
<td>
Test3
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
View 1 Replies
View Related
Jul 9, 2004
Any there any way to make the familiar expanding/collapsing banner ads found on sites like CNET, ZDNet, etc. in JavaScript without having to use Flash? The only thing on the web I've found....
View 14 Replies
View Related
May 16, 2011
i have it to where one of my tabs opens an external link within the panel. However, it lags a little bit. I use css sprites inside the panels and it literally takes a second for it to load when you hover your mouse over it. Also, when you use it in IE, it keeps a cookie, so when you click on another tab and come back to it, it shows the last panel you were on.
So, is there a way just to open another panel inside another panel?
Here is my demo page: [URL]
Click on "Partners" tab on the bottom and click on "McKesson"
View 1 Replies
View Related
May 6, 2010
what is "div.ui-sortable"Im using it in a project to create Igoogle panels.
View 2 Replies
View Related
Aug 4, 2010
I have this code that I found online and I'm trying to figure out how to make this collapsable menu open collapsed when the page opens up.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[code]....
View 4 Replies
View Related
Aug 5, 2010
I have the code below that gives the ability to open and collapse sections.I don't know too much javascript and found this code online. I tweaked it to serve my purposes but it doesn't do one thing. I would like all of the areas to be collapsed when the page is opened.How would I tweak the code below to do that?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[code]....
View 3 Replies
View Related
Jun 29, 2010
i am facing problem with JQuery Scrollable menu, i am trying to placing 2 scrollable panels on a single asp.net page. When there is one panel every thing works fine but when i copy and paste the code so my web page contains two panels vertically, the thing doesn't work, the tow panels just hanged!!
[Code]...
View 2 Replies
View Related
Mar 19, 2010
I am using the following code to rotate my banner 3 times. I am trying to get it to order. Ive set it up so that you can choose yes/no drop down as to whether you wnat a panel to show and I have also set it up with a drop down so you can specify 1,2,3. I want to be able to randomly change the order to say 2, 1, 3 it dosent seem to work with what I have below.
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
$(".ui-tabs-panel > a").hover(
function() {
$("#featured").tabs("rotate",0,true);
[Code]...
View 1 Replies
View Related
May 1, 2006
I have 3 Panels in HTML page, using javascript; I want to display only one panel at one time, for example:
I have 3 panels ids are as: pnl-1, pnl-2, pnl-3
And 3 buttons: "Show Panel 1", "Show Panel 2", "Show Panel 3"
I want the following functinality from all buttons:
Button 1 should hide panel-2 and panel-3, and view only panel 1
Button 2 should hide panel-1 and panel-3, and view only panel 2
Button 3 should hide panel-1 and panel-2, and view only panel 3
Please guide me whether it is possible or not.
View 4 Replies
View Related
Mar 19, 2010
I am using the following code to rotate my banner 3 times.
I am trying to get it to order. Ive set it up so that you can choose yes/no drop down as to whether you wnat a panel to show and I have also set it up with a drop down so you can specify 1,2,3. I want to be able to randomly change the order to say 2, 1, 3 it dosent seem to work with what I have below.
Code:
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
[Code].....
View 1 Replies
View Related
Feb 20, 2009
I am now trying to adapt this script to a section of my site where a user is able to answer questions with checking a yes or no radio button If the user checks a yes radio button then this toggles a slide animation which makes visible some content (another question and after that one a set of answers). Anyway, I am able to get this working for one question only.
Would you like a course of study involving works of art or antiques?and user selects yes radio button and the hidden div content is shown. However if you click yes again its hides (which i do not want) and if you click no it doesnt do anything when i want it to hide the content while the yes radio button makes it visible.So, was wondering if someone could take a look at my code and see if you can make any sense of why its not working as i hope it to (my javascript knowledge is incredibly limited and am learning at the moment).
Below is the html part:
<script type="text/javascript" src="jquery/SOTC-Inline_Sliding_Panels.js"></script>
<body>
<div>
[code]....
View 5 Replies
View Related
Aug 16, 2010
The tabbed menus work, but not in MS IE and I don't know why.
The tabs appear, but the content of the tabs just sits all in one panel.
Clicking the second tab does not activate the second content panel.
This page works in FF but not in IE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="theme.css" />
[Code]....
View 1 Replies
View Related
Sep 10, 2011
bit of script that will work like the 4 panels at the bottom of this page: Jaguar UK - Jaguar
View 2 Replies
View Related
Aug 16, 2009
I have created this Spry Tabbed Panels, this is just an example to help explain what I'm trying to do.Is it possible, or is there a way to make the Spry Tab Panels open from one Tab to the other on page load, like automatically.Lets say the Tab open from 1, 2, 3, 4 and then to 4,3,2,1.URL...
View 2 Replies
View Related
Jun 29, 2010
how to populate a dropdown based on Another dropdown selection. This all should be a dynamic. Eg: I have two text boxes one is TechID and other is JOB ID. When I start typing Tech ID it suggests me the list of IDs which start with the input string i have put in Tech textbox. When i select the Tech ID the jobs associated to that Tech ID should be displayed in JOB ID text box as a dropdown list.
View 1 Replies
View Related
Sep 6, 2011
I will like to know if there is anyway to view all the rules that I have currently in the Jquery validation plugin. Currently, I am trying to add in rules dynamically through the rules(add) function after adding some dynamic fields through the user inputs. the rules are added in this manner.
[Code]...
View 2 Replies
View Related
Jul 23, 2005
I am having a problem with the last results. I can't seem to be able to
get the input2A and input3A to appear. I don't seem to have a problem
with the show and hide after a number is entered and submitted. If
anyone can answer my problem I will be greatly appreciated with a
prize. I actually have submitted it more than once and I haven't had
anyone been able to answer it yet. Code:
View 5 Replies
View Related
Jul 1, 2011
i was trying for some days now to find a solution for this. had a look at different posts and forums online, but no luck so far...is it possible to auto-create this with a loop???:
Code:
T$('infowindow1').onclick = function(){ setInfobox('1'); }
T$('infowindow2').onclick = function(){ setInfobox('2'); }
[code]....
View 5 Replies
View Related
Jun 30, 2009
I've been beating my head against a wall for a few days trying to get this working. I'm trying to create a dynamic menu where a user selects one item and another select list is shown, then another and another (and so on). Here is my JS, it *should* be taking the ID of the div, comparing it to the selected value and then showing another div by settings it's class property to visible:
[Code]...
View 1 Replies
View Related
Oct 25, 2010
I have made a script where you can add extra fields, and next to the row is a span that automatically displays the outcome from a calculation of three fields in that row. i.e. Q x (B - A) = total. Here is the bit that does the calculation:
function advCalc(selected) {
var result = Number(document.formmain.elements["quantity"+selected].value) * (Number(document.formmain.elements["provideamount"+selected].value) - Number(document.formmain.elements["supplyamount"+selected].value)) ;
[Code]....
View 23 Replies
View Related
Aug 5, 2011
this my first post (I'm a newbie)...I'm going to be crazy :-(
[Code]...
View 4 Replies
View Related
Aug 1, 2009
i create tatble row dynamic using append after calling web service. Itcreate ok.After create table i try to add css to the td but it doesn't seem towork. any idea how to resolve thisthe syntax is correct. I noticewhen i view source, the all the row are not there.
<table id="tbid">
[row append dynamiccly]
</table>
View 3 Replies
View Related
Oct 30, 2009
I have a very simple html structure and the idea is to create and useDIVs or elements I do dynamically, so there is one div which I use todo something like:
$("#main").html("<div id='img-lisg'><img id='img1' .....></div>");
That works just fine, the problem is when I try to use events on theelements I've created dynamically, those just don't work. There issomething like this:
("#dynamicDiv").click(function(){
alert('Testing');
});
It never works,... how should I create the handlers for the DIVs
View 2 Replies
View Related
Feb 27, 2011
i use jQuery with the history plugin to fetch content dynamically. it works like this:<a href="#pagename">Page 1</a> this would be my call to fetch 'pagename.html' into a div labelled in an XHR call. anyhow, the problem.
I need to fetch a page with a module, which would normally work like this: <a href="content.php?sort=country">Sort by Country</a> but due to me fetching content dynamically, i cant put a link like this as it would send me out of my page, and onto the page 'content.php' I was wondering if there is any way around this? im really a newbie on jquery, so i havent a clue. The ajax call i use is here.The plugin is [URL]..
View 9 Replies
View Related
Oct 28, 2009
Currently, I am using class called calendar to add the datepicker.
$('.calendar').datepicker({
changeMonth:true,
changeYear:true,
dateFormat:'dd/mm/yy'
});
But I have some elements which I add dynamically and the element ID is totally dynamic. I have also added the class called calendar on those dynamic elements. But, jQuery couldn't parse the dynamic elements at the first. So, How can add the datepicker feature to dynamically added elements.
View 1 Replies
View Related