toggle

How to code JS toggle to print in automatically expanded view?

First, here’s the page question: http://www.tranzact.com/test/solution_freightfaqs.html I used a simple “Print Page” function (below): <a href="#" onclick="window.print();return false;">Print Page</a> Below is the toggle.js script: function toggle(theID) { if(document.getElementById(theID).style.display=='none' ){ document.getEle...

onlick on link display only div, make other body balck or shaded

I have a page which has anchor tag clicking on which ma div tag toggles. I want to make whole body of page black or shaded except that Div tag. ...

jQuery accordion links do not work

I have no idea what I am doing, but I found some code, that I am using to create a accordion dropdown for a help page on my blog. Everything is working perfectly, but when I click on a link in the dropdown, it closes the accordion and does not go to the external site. I have no idea what I am doing wrong. Is there a way to fix this? Her...

jQuery chaining and toggle not running

If I run this code, var waitRow = $(this).parent().parent().next().get(0); $(waitRow).children('td:nth-child(2)').html('some text').toggle(); toggle is not called. If I instead write the following code it works. Why? var waitRow = $(this).parent().parent().next().get(0); $(waitRow).children('td:nth-child(2)').html('some text'); $(wa...

Binding collection to tool bar buttons and getting current selected item

Here is the scenario. I'm having a List in my view model and I want to generate a toolbar - each button representing a CustomObject which will have the tooltip, icon etc. I'm defining a template to display CustomObject in a toolbar button and also define the toolbar button ItemSource to the viewmodel collection and ItemTemplate to the o...

jquery.toggle and layout issues when used in table

I have a table. Each row is a record. If you click on a row (record), via jquery, I create a new TR below it, and then insert a new table (related sub-set of data pertaining to the above record) via AJAX. This is first loaded and then I expand the TR in a nice animated fashion. It looks good. Now that it's loaded and expanded, I want t...

JQuery: SlideToggle on links?

How do I perform a JQuery 'slidetoggle' effect using a hyperlink, instead of an input button, as the action item? At the JQuery refence page http://docs.jquery.com/Effects/slideToggle#speedcallback It only gives an example of using a form input button. I would like to have instead of a button, a hyperlink to be the toggle clickable a...

JQuery: Toggle question

How do you fire a JQuery toggled event once, and only once, another JQuery toggled event has been completed? I have the following: I have <div id="displayDivWhenPageLoads">...</div> - this DIV is show (visible) when the web page loads. I also have <div id="displayDivWhenToggledSelected">...</div> - this DIV is hidden (display:none) wh...

Prototype / Accordian using images within <div class="accordion-toggle">

Heyas, The problem I'm experiencing; Using Prototype with Accordion I'm having problems using images within the . I'm extremely unfamiliar with jscript and web concepts so I thought it better to ask you guys before i break anything! /* Simple Accordion Script * Requires Prototype and Script.aculo.us Libraries * By: Brian Crescimann...

Toggle between two classes in jQuery

I'm trying to modify the icons for the jQuery UI portlets. Rather than have a plus to minimize and a minus to expand, I wanted to switch them. I've only had limited success with it where the first time to click the minus it flips to a plus, but the plus never flips to a minus. Any help on this would be much appreciated. Here's a sa...

Jquery - slideDown with existing height.

If i have a div with a class that sets the height 100px, and overflow:hidden (effectively a preview of it's contents), how can i incorporate the 'slideDown()' method to slide to the full height of the div? (i.e. remove the height restriction in the css class). ...

jQuery checkbox not checking

I have a form setup so that when you check a checkbox, the relevant UL will expand showing more options based on the choice. It works, but only when the user clicks the label of the checkbox. If the checkbox is clicked, the UL expands as expected, but the box doesn't get checked. Javascript: jQuery(document).ready(function() { ...

How to toggle number of rows with jquery?

I want to add Toggle show-rows like Google analytics top content. At the bottom of Google analytics top content, there is a dropdown option to select 20, 50 etc to toggle number of top content. I want to add this javascript to my dynamically generated product list. It seems like it uses onCharge in select tag. I want to use jquery fo...

jQuery toggle on each?

im using jquery to toggle some paragraphs. its pretty easy with just one paragraph but say i have a very generic setup. the second paragraph is initially hidden with css. <p>some text</p> <p>some more text</p> <a href="#" class="more">read more</a> <p>some text</p> <p>some more text</p> <a href="#" class="more">read more</a> problem ...

motionpack.js remember state with cookie?

Hi there, I'm currently using Harry Maugans's motionpack.js toggle javascript file in order to collapse divs. I'd like to know if it's possible to put it so that there is a cookie value assigned to it? That way it remembers if a certain div has been collapsed or open. I'm currently new to javascript, so it'd really appreciate it if s...

Toggle the Background Color between two links to show which is active using jquery and css?

(Jquery) I have two divs that I'm toggling back and forth (show and hide) between on my page using a link to each. I want the link that is clicked on to change to a highlighted background color and when you click on the other it is highlighted and the previous goes back to normal. I've tried reworking the toggle code I've got for the di...

How to correct a jQuery syntax error?

I'm trying to update a Total: (span.wrap p span) field at the bottom of a form using jQuery. I have a few checkboxes, each of which has an associated price contained within the title attribute like so: title="$2". I'd the Total: field to update dynamically when the user clicks a checkbox. Here is the script I have, but it's throwing a ...

jquery: .toggle(switch) with effect?

i like the jquery.toggle(switch) function as i can do the following in one line; $('.mytable').toggle(checkboxes[0].checked); However i cant seem to integrate effects into this call (sliding / fading etc). Can anyone offer suggestions? ...

jQuery toggle effects 'flashing entire page' in certain cases.

I have a page that may have 10 or so editable 'panels' of information. To enable editing, I create a new DIV, load content via AJAX then toggle the divs (the one showing toggles off and the one I created with AJAX content is toggle to show). This works great except for the last (bottom-most) one or two areas. When those toggle, I get a ...

checkbox / div toggle

$(".trigger").click(function () { $(this).next(".toggle").slideToggle("fast"); $(this).toggleClass("active"); return false }); HTML: <input type="checkbox" class="trigger"> <div class="toggle">content</div> It isn't working, whats wrong with the code? Thanks ...