Code:
<li onclick="javascript:showdesc('This is info about trucking', 'truck');">Trucking</li>
<div id="trucking"></div>
<li onclick="javascript:showdesc('This is info about bulk delivery', 'bulk');">Bulk Delivery</li>
[Code]...
This all works good, however when I click on some of these it just moves the text down the page but it doesn't expand the column and the text at the bottom just gets pushed down past the page.
I have an odd issue for which I hope someone has a solution. I'm using the jQuery accordion to display a list of links in the left column of a table. When I click to expand the accordion in the left column, the table data in the right column moves to the right for a moment and then moves back to it's original position when the accordion finishes expanding Here is a link to the page:
I'm using the localscroll jquery plugin to scroll through content in a div by using an unorder list navigation. I have the containing div (#page) set at a certain height and the overflow set to hidden.. the problem I'm having is I want the #page div to be elastic so that it grows and shrinks to fit the child div it scrolls to..you can view the scroll plugin in use here:
[URL]
its activated using the product list nav toward the bottom of the page on the left.How would I set it up so that the #page div shrinks or grows to contain the full visable size of the child div (.scroll1, .scroll2, .scroll3, scroll4 etc)
I am doing an internship at a company and am working on an existing site. The Company wants the expanding menu to stay expanded when you click a link to go to another page while navigating. I am very new to Javascript, CSS, and html and could really use some insight or code example.
// JavaScript Document /* This script and many more are available free online at The JavaScript Source :: http://javascript.internet.com
.innerHTML is used when you trigger an event but if you just want to display the text how would you go about do it? I don't want to used document.writeln because it will "Wipe out all the contents" of that page. So I have some HTML text and javascript text. I would like both to display on my page.
Here's my code Code: <html> <head> <script type="text/javascript"> function display() { document.writeln("How do I make both text appear"); } </script> </head> <body onload="display()"> I would like this text in the body to remain. <script type="text/javascript"> display(); </script></body></html>
I have some radio buttons, for example<label><input type="radio" id="unitedStates" name="country" value="US">United States</label>They show the selected value, e.g., United States, with the radio button, but elsewhere on the page, I want to state the selected country in a paragraph statement.The following jQuery statement
$('#selectedCountry').text("Selected country was:"+ $('input[name=country]:checked').html());
puts Selected country was: on the page, but it does not concatenate in the innerHTML of the selected radio button.How do I get Selected country was: United States to appear?
I have been trying to get a simple javascript that expands and collapse's a set of div's. Now this works a treat in its own html file. but when I use the div's in the product display the javscript doent work?? :-( anyone know why??
My shopping cart is template and database driven, with each part having its own template file. the divs are in the product discription which is pulled from the database.
I have a form with a drop down combo box of a specified size. However, I would really really like it if the user was looking at the contents of the list it would expand to fit the text in the list. However, I believe that IE does not allow the rendering of popdowns in this manner!
Is there some other way that I can do this using javascript and html/dhtml maybe?
I'm very new to JQ, I was looking for a solution to expand a div on mouse hover from its center to display some dynamic text wrapped in a code tag, I found and tried to fit to my needs this little piece of code, however is not exactly what I'm trying to do.
Ive got the follwoing javascript code that will expand/collapse a section of my site that is enclosed within a <div> tag.
function showorhide(id) { if (document.getElementById(id).style.display == "none") { document.getElementById(id).style.display = "block"; } else { document.getElementById(id).style.display = "none"; } I am using asp.net 2.0 to code my site with, the above code works fine (example below:
<a href="#" Personal and Contact Details</a> <div id="basicdetails">
</div> All that is enclosed within the <div id="basicdetails"> is expanded / collapsed.
HOWEVER, im geting a few problems with this method: 1. On a page load, the div tags are always displayed, is there any way of having them collapsed on page_load?
2. When i put 2 seperate <div> tags (i.e. 2 seperate expand/collapse sections on the same page), one is collapsed and one is expanded, when working within the expanded one and a button is clicked (for saving of info from a form), both divs are then expanded?
I've created an ad unit which is to be embedded on other sites. In this ad unit are links which when clicked upon, as supposed to lightbox the link using lightview over the whole page, not just inside the ad unit embed.
I've used iframe and object tags and the result is that the content always opens inside the object frame. Is there any way, other than a flash embed which expands, to do this? Basically, what I'm looking for is a non-Flash ability to overlay something over the whole page (or at least expanded outside of the embed)
Im just starting to get into javascript, and what I am trying to do is find a script that I can run on page load that will collapse / hide all div tages that have an id that begins with "div_".
Basically I have a page with an infinite amount of div tags each having their own id, ie div_0 , div_1 etc etc ..
on page load i want them all closed, but only these ones . not any other div on the page .. how would I be able to do this ..
I have a div which I want to increase in pixel size by 10px each time a button is checked. The change in size needs to be animated. At the moment, I can only get it to increase to a fixed dimension:
I have a div, and a container div. This div is my footer. I want to beable to slide items up out of the footer. However, when I use the toggle() and use marginTop/marginBottom it slides perfectly, but only expands the div downwards thus causing scrollbars to appear. Is it possible to define which way you would like a div to expand?
So just to be clear here is my code:<style> #footer-container{ overflow:hidden; z-index:100; position:relative; border:1px solid #f00; width:1000px; margin:auto; }#footer{ width:1000px; margin:auto; height:32px !important; background: url('../../img/footer/footer_bg.png') repeat-x; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#555; margin-bottom:0; bottom:0; padding:0; } <div id="footer-container"> <div id="footer"> some contend links etc.. </div></div>
As you can see from above there is an overflow of hidden set to the container div. The footer div has a height of 32px and bg image. The only way I can get this to work is if I put a postion:fixed on the #footer. This is not what I want, because it then remains on top/in position when scrolling the page. Is it possible to set a div's expansion direction in jQuery? The above expands the div downwards. I would like to expand it upwards.
how to embed YouTube videos into a vBulletin installation of mine. How would I go about making a vertically expanding table that expand when the user would click on the "YouTube" text? I'm thinking of starting out out as a size maybe 100px high and 400px wide, and expand to 375px high and 450px tall. I've checked Google, but nothing seemed to come up that I could use.
I would like to know how to create such an effect using javascript. Example: This site (http://kreativity.ca/) , at the menu button (with the Home, About me,)
All i know how to do is using the mouseover effect, and then displaying an enlarged version of the image (thus creating a "drop down" effect). However, i do not know the code to make the image "drop down" gradually.
You know those directory trees that expand and contract when you press the +/- or arrows? I'm trying to make one of those, but with checkboxes instead of +/- or arrows, and XML elements instead of directories.
I used on of the examples in SitePoint's new book jQuery: Novice to Ninja, and implemented it in a site I'm working on. I hide sections of the content, and expand them when clicked on (www.symboticware.com/projects/)
Is there a way I can make it so that when you click on one of the projects, your browsers scrolls down as much as possible, so that it is the focus in your browser. Much like using an anchor link, but with jQuery?
I am trying to build a navigation bar that is inside a header div on a page, the page is fixed width and centered, as is the nav. On hover (over the Options nav link, I need the dropdown to then appear (horizontally). The problem I am having is, I need the dropdown background to be the same colour as the parent link background (in this example yellow) and for the ul ul to stretch the full width of the page.
So in the example, the header would be the black bar (full width) and on hover of options, for the yellow bar to also stretch 100% of the page below it:The page I have so far is as follows:I have built the nav but only so that the dropdown shows all of the time, but I need this to show just on hover.Also, the dropdown is only stretching to the container width.Is there a way to make only the dropdown bar (the long yellow UL bar) stretch the entire width and only on hover? The code is as below:
I am using a script for my navigation which is a vertical expanding menu that opens when clicked on. However when i have added another script which creates a scrolling marquee across the page, the menu links dont stay expanded as the page gets reloaded (ie. <a href="#".. ) as if its a normal link. Code:
On my website I have a Table with 2 columns, each column has a DIV in it. How can I make it so that each of the DIVs take up the entire space in the Table TD? I can post an example or link to the site itself...if that's allowed.