Im creating a javascript content expander and would like to know how to create it so it changed the image from an down arrows to open the box, and a down arrow to close the box.Here is my current code.
Code:
<script type="text/javascript">
//var persistmenu="yes"
var persisttype="sitewide"
[code].....
I want the <div class="rightnews"> thing to change from an up arrow to a down arrow.Here are the icons im using.for the box to contract:
I'm using the toggle effect to create the expandable content here. However, when I click Refresh, you see a flash of the expanded content before it quickly collapses again. Is there any way to get rid of this?
Is there a way where I can "guess" what relative speed the user's connection is?
Currently, the client is wanting some graphical intensive content and I'd like to be able to warn users on dial-up to allow them to go to a "gracefully degraded" version.
I thought of simply putting up a question for users to answer but the client would rather it happen, more or less, automatically.
im trying to have two links at the top of a page one is FEED and the other is INFO when the page opens it should be on feed, and if i click info it switches to info and the feed button becomes available to click again, at this time hte page content should switch as well.
I'm trying to create a switch image code that will allow the new image to be a link as well. In the list item where you'll see ('blue.jpg') if I try to make this an anchor tag - it breaks the code.
<head> <script> function switch1(div) { if (document.getElementById('blue')) {
I'm writing an image gallery script in which the thumbnail for the currently-viewed image is indicated with a smaller image below the thumbnail. My placeholder is as follows:
<img name="indicator0" alt="indicator>
with indicator1, indicator2, etc. following, one below each thumbnail. In my script, which placeholder has the indicator is called by the variable thumbIndicator. I'd like to be able to do that like this:
I have the following as a code for an image rotation on each click (with three images)... when I load the page the first image loads fine and I click on it twice and the other two images switch smoothly, but then click a third time to go back to the first image and it doesn't go back to the first image. here's the javascript:
Code:
imgs=Array("pics/adv/chrebMs1.jpg","pics/adv/chrebMs2.jpg","pics/adv/chrebM.jpg"); var x=0; function change() {
I have some divs I am toggling and there is a little + sign image I want to change to a - sign image when the toggle event occurs, but can't quite figure it out. Here is the toggle code I have (taken from
I have a site where i switch between two images using some JavaScript. What I need is to be able to set a session variable or something so that if someone selects shading on or off it sticks to that for the rest of the session.
Any idea or even a point in the right direction. Do i need cookies or is there a simple way to do this
Been trying to get a short script I wrote to work 100%. Basically it checks to see if the main page image is =>375px and if it is shunts the text down below it. Its not a live site yet and due to it being so short I thought I would just copy and paste it here:
function checkImage(imageId) { if(document.getElementById) { var id = document.getElementById(imageId);
[code]....
The problem is with IE6, it randomly decides not to work without any sign from the debugger that anything is wrong. This is my first time using onLoad with an image, is there any quirks with it such as page load order (e.g. if the image finishes loading before the text loads this wouldn't appear to run?).
It's kind of hard to start explaining what i did or maybe even harder why i did it that way. But ok i neededtext replacement for custom fonts. Cufon couldn't be used because of the large amount of text and javascript in general on the site. It should play nice on IE6 that's why i chose to use facelift(server side text to image replacement). The problem arose when i needed to show a different font on hover state. I created two elements with the same position and now i want to switch them on hover state! It's actually working but when hovering fast over the different elements the hover state's mixes up ending ugly and wrong...
I have pairs of terms and short definitions in a table. I want to display a longer definition in a box below the terms table when the term is clicked on. The box needs to disappear if clicked on. [code]...
as you can see the items hide/show on click using a simple jQuery toggle. My question is, is it possible to link to my website with one section already expanded from an external source. I hope this question makes sense. Iv tried and failed by linking to the div id using #link but cant get that to work.
I want to display the question and answer in the following way. When the user moves his mouse to one question, the question will be expanded to show detailed answer of that question.
For example,
1. What is UML?
2 How to implement it?
3 What is the advantage of UML?
When i move the mouse to the Question 1, the question will be expaned and have a detailed answer of it; if i don't move to there, the outline won't expand.
I search for a long time, but have no clue. What functions should be use???
I'm almost done customizing the Superfish jQuery menu to fit my web site theme. I have all of the menu hover and submenu hover styles in place, but I'm having a problem with the color of the top-level menu item's font when the submenu is expanded. The active top menu item's background matches the hover color, but when I hover overa submenu item, the font color reverts back to the original (non-hovered) color. How do I get the top level menu item's color to match its hover color when the submenu is expanded?
The relevant portions of my CSS are as follows: .sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ color:#8C1C39; }.sf-menu a.sfHover { color:#FFFFFF; }.sf-menu li { background:transparent; }.sf-menu li li { background:#FFFFFF; }.sf-menu li li li { background:#9AAEDB; }.sf-menu li:hover, .sf-menu li a:hover { color: #FFFFFF; background:#00207B;outline:0; }.sf-menu a:focus, .sf-menu a:active, .sf-menu li li a:hover, .sf-menu li.sfHover { background:#8C1C39; color: #FFFFFF; outline:0; }
When the left column first loads the vertical scrollbar displays correctly.
The vertical scrollbar is aligned up against the right border of the first column of the table which you can see by looking at the first image, and comparing it to the second.
Once I click on a folder in order to expand its contents, the vertical scrollbar introduces a gap of about 20 pixels as shown in the circle.
I looked at the css tag for the "classes" folder using firebug, and it showed {class ="directory collapsed", class= "directory expanded"} prior to and after expanding the contents of the folder.
I did a global regex search, within the project hierarchy, for (collapsed|expanded) and could not find any css that showed any margin-right for expanded, nor could I find any css at all related to "directory (collapsed|expanded)".
The only thing I found was that jqueryFileTree.js contained a function bindTree(t) with some code that toggled (collapsed|expanded):
Does anybody have a clue what is causing the gap once I click on a folder, and how to fix the problem?
Even if close the folder once the gap is there, I can't get rid of it unless I reload the page.
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
If slideToggle()'s parameters were expanded to include a separate callback for sliding up and sliding down. Or for backwards compatibility, perhaps include an optional boolean parameter in the callback to more easily discern between a slideUp and slideDown operation.
I currently have a Drop-Down menu, which has headers you click on to show the links. This menu only allows one drop to be expanded at a time, and can be viewed here [url].
I would like the headers to be able to have 'sub-headers' inside, which also drop-down,to reveal the links. I want them to have a different header colour, and to have the same rule where only one can be open at a time. while keeping the rule with the main headers.
I'm trying to figure out how I can check if a certain div on my page contains an image or not. Kind of; if (#div contains 'img'){do this} else {do that The div will always contain some code etc. but not an image typically. the image name is always the same: button.png if that matters.
I am using the cycle plugin here at my site, [URL].. The cycling of the image pages works as it should but I am a little lost on how to get some content on those pages.