Jquery :: Accordion Script - Changing Click Action?

Oct 5, 2010

I found this great accordion script that does everything I need, EXCEPT: I need the first level <li> to close upon second click of itself, collapsing the list - meaning I also want the option of the list able to be closed WITHOUT clicking on another first level <li>. How do I change the code below to do that?

Code:
function initMenus() {
$('ul.menu ul').hide();
$.each($('ul.menu'), function(){
$('#' + this.id + '.expandfirst ul:first').show();

[Code]....

View 2 Replies


ADVERTISEMENT

Changing The Action Of A Form With An Input Named Action?

Feb 16, 2009

I have come across a very interesting problem that seems to be impossible to solve. Basically a web application that I am working on relies on a JavaScript function called go to change the input named view to the page name and submit the form. This form's type is post, so no values are included in the actual URL string. There is also another input called action and it's value is view. This is to tell the application that the user would like to view a page. The problem is because of the variables being of method post, page refreshes and back and forwards return errors because the post variables view and action aren't sent with the required data. To somewhat solve this problem I have created a feature that tells the application that if the post value page is empty then to try and get a GET var called page. To insert this var into the go javascript function I simple add this code

document.go.action = document.go.action+"&page="+page;

This line basically adds &page=[page] to the action of the form. The problem is, this code doesn't work because action is also the name of a form element. Referencing document.go.action refers to the input element named action and not to the form's action. Changing the named of the action input value is out of the question (Way to much changing of code, and possible room for error). What can I do to change the action of the form without referencing the input named action. Here is my go form and the JavaScript code:

<form name="go" action"index.php?sid=123" method="post">
<input type="hidden" name="action" value="view" />
<input type="hidden" name="view" value="" />
</form>

[Code]....

View 6 Replies View Related

JQuery :: Get Mouseover And Mouseout Action To Take Place After Changing Div With Post Method

Sep 17, 2009

I added mouse in and mouse out affect like this in $

(document).ready function
$(document).ready(function(){
....
$(".StripMe tr").mouseover(function(){

[Code].....

My question is if i used jquery post method to change some div content, than this new div won't have mouseover and mouseout affect anymore, is there anyway to achieve it. Is that needed to trigger ready function again? Another question is can anyone teach me how to add click and dblclick event to the same div, because if i add both of them then it won't trigger dblckick event.

View 1 Replies View Related

JQuery :: Accordion Click() Not Working In IE?

Apr 21, 2011

I'm coding a site with a four-stage accordion as a navigation sidebar. When a user clicks on an accordion stage, an image with a text link overlaid pops out from beneath.It's working fine in every browser except, natch, IE, and I'm flummoxed as to why.Here's the HTML for the accordion. There's a nav tag called #sidebar which contains two parts: an aside (#conditions) and the accordion (#navV). You can pretty much ignore #conditions, as it's #navV that's causing the headache, but I thought it prudent to include it anyway.

<nav id="sidebar">
<aside id="conditions">
<h3>Find out more about</h3>[code]....

As I said, working a charm in FF, Chrome, Opera, Safari. Just IE - you click on the <li><span> and nothing happens.

View 6 Replies View Related

JQuery :: Accordion Will Click At First Tab And Close The Others Without Opening?

Nov 14, 2011

I've managed to do that so when i click on the first tab it will close the other open tab.The problem i'm facing is when i click on the first tab that it supposedly will not open even if clicked.It does not open but from times to times when i click a lot of times , go out of the accordion and then bring the mouse again in and click just right at the bottom of the first tab(the one it cannot be opened) and the second it sometimes open the first tab!!!

My code:
$(function() {
$("#accordion").accordion({
collapsible: true, active: false
});

[Code].....

View 2 Replies View Related

JQuery :: Reverse The Click Action Of A Function?

Sep 24, 2010

I am trying to display a hidden bookmarks list when the bookmarks category heading is clicked on. I have gotten as far as writing the script below so that once the heading is clicked, the list drops down and the list items fade in..

how to I make the list items fade out prior to the list collapsing again?

Here is what i have conjured up so far:

var $j = jQuery.noConflict();
//online bookmarks
$j(document).ready(function() {
$j('#online-links').click(function() {

[Code].....

View 1 Replies View Related

JQuery :: Accordion Menu Click And Hoover On Parent?

Dec 24, 2011

someone created a Liferay portlet for me where we use a accordion jquery menu.Now for the "parent" menu I would like to know if one can have a page attached to the parent, that appears "on click" and (so parent "home" opens home.html) and at the same time expand the chile menu oh "home"?Here s the script from the header:

var currentObj;
jQuery(document).ready(function(){
//open active level

[code]....

At the moment the menu expand is done by having a + sign behind the parent menu items. One clicks that plus and the menu expands and the + changes to -. We have the feeling that the + sign is not clear enough and site visitors will not see the rest of the menu.

View 1 Replies View Related

JQuery :: Accordion - Collapse Active With Button Click?

Jul 26, 2011

I am using a basic jQuery accordion and what I am trying to do is add a button inside each section where if the user clicks the button, it will collapse the section, leaving all the sections closed. I just don't know how to get the button to close that section.

See below for example of what I am doing.

<div class="accordion">
<h3><a href="#">Header One</a>
<div>
<asp:button runat="server" class="cancelButton" text="cancel" />

[Code].....

View 5 Replies View Related

JQuery :: Making Horizontal Accordion Close On Click?

Apr 6, 2010

Currently, the script allows you to click on a piece of the accordion to open it, but it is set to close on mouseleave. When I set the mouseleave to .click, it gets confused and doesn't know what state it is in. The code controlling this is below, and the full script is in haccordion.js linked in the page source.modify this script,

$target.click(function(){
haccordion.expandli(config.accordionid, this)
config.$lastexpanded=$(this)

[code]....

View 1 Replies View Related

JQuery :: Have Click Action Run Animation And Then Goto A Page?

Jul 9, 2011

I am trying to get an animation to execute and then navigate to a different page only after the animation is finished.

-------- Start --------
<script>
$(document).ready(function(){

[code]....

View 1 Replies View Related

JQuery :: Relocate Click Action To Bind('hashchange') Function?

Aug 16, 2010

How do I replicate this click action within abind('hashchange') function?

$("#menu > li > a").click(function() {
$("#menu > li > a.expanded")
.not(this)
.toggleClass("expanded")
.toggleClass("collapsed")

[Code]...

View 1 Replies View Related

JQuery :: Capture Click Event And Append To End Of A Form's Action Via Ajax

Jun 23, 2010

I need to capture the click event, edit form action then re-submit the form with the captured input value appended to the end of the action. I would like the end url action to be google.com/tada

<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
</head>

[code]....

View 2 Replies View Related

JQuery :: Hides All Divs Except The First One (check The Site) On Load, Then Whenever Click A H3, It Performs As An Accordion?

Apr 5, 2011

I've got my accordion working.The html and jq are as follows

<div class="nav">
<h3><div></div>
<h3><div></div>
<h3><div></div>etc..
</div>
$(document).ready(function() {

This hides all divs except the first one (check the site) on load, then whenever I click a h3, it performs as an accordion, sliding the hidden div down and other visible divs back upI want to add another functionality. I want it to be like, if you click on a h3, and the next div is already open, it will hide that div. else, it performs this function. This would be a basic if/else then wouldn't it? I'm new to jq but I've done mIRC scripting in the past and I don't know how the selectors work yet

View 2 Replies View Related

Changing Css Class Of A Link On Click Withing Changing Original Code?

Jan 12, 2011

I currently have a normal link like Code:<a href="http://sitepoint.com" class="link">sitepoint</a> and when a user clicks on it I want to be able to change the "link" class to a different class. However, I don't want to add anything to the actual link html. Is it possible to do this using javascript without modifying the original link code?

View 4 Replies View Related

Invoking OnChange Action When Programmatically Changing Checkbox State

Feb 1, 2010

I'd like to know if it's possible to invoke associated onChange action of check box when changing it's state with another javascript command... ie.

<input type="checkbox" name="y" onChange="javascript: func('var');">
document.x.y.field[i].checked = true;

When I execute last line I'd like func('var') to be run as well. Unfortunately it doesn't happen as of in the example above.

View 2 Replies View Related

Jquery :: Toggle Be Use To Switch Divs On Page Load Instead Of Having To Click A Button To Start The Action?

Jul 20, 2010

Can JQuery toggle be use to switch divs on page load instead of having to click a button to start the action? What would I have to write in the header to make this happen if this is possible?

View 2 Replies View Related

When I Click An Action, Want The Script To Run On The Div?

Jan 2, 2010

When I click an action, I want the script to run on the div (which I'm currently doing), but when a hidden frame page finishes loading, I want it to reverse the fade and fade back in.o, either stop the fade out in progress and then fade back in from that point or, if the fade has completed to zero, fade in the div layer all the way again.Here is the script:

Code:
// @name Slowly Fade
// @version 0.88

[code].....

View 5 Replies View Related

Getting 2nd Click To Close Accordion Element

Jun 11, 2010

I've modified the Filament Group's jQuery Collapsible plugin so it would close any open elements when an new one is clicked to open. I'm using this plugin instead of the standard jQuery accordion because of how it handles accessibility issues. But now, when a user clicks an already 'open' element to close it, the element closes momentarily & then opens again. Not the desired behavior. It appears that the 'else' statement that handles this is being incorrectly interpreted (or rather, I'm passing the wrong data). here's the section of the code before modification:

[Code]...

View 2 Replies View Related

JQuery :: Accordion - Stop The Rollover Effect In The Sub Menus Until The Accordion Animation Is Finished?

Aug 5, 2010

I created an accordion menu with rollover sub menus. My question is there a way to stop the rollover effect in the sub menus until the accordion animation is finished? When I click on a category link on the accordion the sub menu links flashes until the animation is done.

View 1 Replies View Related

Force Click On An Accordion Index (section)

Sep 11, 2011

I want to bind a click event to a selector which when clicked will open up a given part within an accordion. In the example below I want a link with an id of show-part1 to open up the first section of an accordion. My accordion has four sections. Consequently there are four 'accordion_trigger_index' classes with an index value from 0 to 3.

The code below triggers but it just kicks me to the top of the page and then back again, as if the $('.accordion_trigger_index').click(function(){}); is firing albeit not interpreting the index value.

The accordion works fine when clicked on directly. The error must concerning forced a click event while passing the index of which accordion_trigger_index class I want it to trigger (open).

Code JavaScript:
<script>
$('#show-part1').bind('click', function() {
$('.accordion_trigger_index').trigger('click').index(0);

[Code]....

View 3 Replies View Related

JQuery :: Difference Between Accordion Widget UI And Accordion Plugin?

Oct 1, 2009

explain to me the difference between the two? I just finished an online tutorial on Accordian Widget UI and it

View 5 Replies View Related

JQuery :: For An Action On A Element, Stop The Action On His Parent?

Dec 2, 2009

Is that possible when you click a child that the function on the parent don't run.

In these example, if I click on 'h2 > a
', both elements triggers functions ('h2' & 'a')
What I wan't is that if I click on 'h2 > a

[code]....

View 1 Replies View Related

JQuery :: Stop A Action Hover And Just The Last Action Happen?

Jul 23, 2011

I need to know how stop a action hover and just the last action happen

View 2 Replies View Related

Jquery :: Accordion Menu - When Click One Of Sublinks In IE7 - Briefly Flashes All Sublinks - Even The Hidden Ones

Feb 2, 2010

I'm trying out a jquery accordion menu. Problem is I'm having problems with it in IE (7 at least). There's three stacked menu links, two of which contain sublinks (where the accordion comes in). When I click one of the sublinks in IE7 it briefly flashes all the sublinks (even the hidden ones). It'll probably make more sense if you give it a try!

[url]

I'm guessing its something to do with the HTML body of the page kicking in before the javascript?

JS file is here:

[url]

View 3 Replies View Related

Pagination Inside Accordion - Click Next - Prev Or Page Number - Refresh ?

Nov 2, 2011

I m able to do pagination. But I face another challenge where I once click next,prev or page number,it will refresh the accordion. let say i got 3 headers of accordion.namely A,B,C. After clicking any function in either B or C. It will auto refresh to header A. is it due to I destroy my accordion each time I called?

View 3 Replies View Related

Trigger Two Action In One Form / When User Click Single Button

Feb 3, 2010

how i can trigger two action in one form when user click a single button

View 8 Replies View Related







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