I have five divs that I want to work kind of like an accordion, but you can open multiple sections. Right now, when user clicks any link, it opens all five sections. And when you click to close, it closes all five. I want to be able to open one section, then go to the next and so on.
I've got a div that slides out from the left of the screen when the page loads but I can't figure out to get it slide back when another navigation button is clicked. The navigation has several buttons so clicking on any of them would make current div to slide back out of site.
I need some help with closing a popup window. I'm making an online portfolio, that has one base page with text and thumbnails. When a user clicks on a thumb, a new window opens containing a larger image and a caption (each contained on a separate htm document). I do this with a function in the header script as follows:
var picpage=" "; var params=" ";
function fullpicwin(picpage,params) { window.status="Opening picture... please wait"; window.open(picpage,'fullpic',params) }
picpage (the name of the htm file), and params (window size, etc.) are passed from the click code by each thumb. Each popup is sized differently, of course, based on the side of the larger photo. All controls, etc., in the popup are turned off. The user can click the "x" box or a form button at the bottom of the popup to close the window.
All this works very nicely... EXCEPT...
The user can move the mouse back to the main page and open ANOTHER popup by clicking on another thumb BEFORE closing the existing popup. The problem is the 2nd popup retains the size of the first, so of course the photo may be blocked by the borders, etc.
What I want to do is force the closing of the first popup if the user tries to open a 2nd and so on. There is no reason to have more than one large photo showing at the same time.
I thought I could put some code in the function that checks for the existence of a window named "fullpic", and if it's there, closes it first, then opens another. But I can't seem to get the syntax right.
I am calling a Java Script function on the button click of a pop up window (ASP.net). The function does the following: 1. Close the Popup window 2. Call JS function on the Parent window 3. Try to open another popup I am able to close the popup window and call the js function on the parent window but I am not able to open the new window.
CODE: window.close(); window.opener.clearfields(); window.open('MyExcel.xls'); I need to perform all these in one JS function.
I have been trying to do some tooltips for a website and desperately wanted to learn something new and do that with jQuery.However, every time a mouse hovers over a tooltip, all hidden divs are shown, not just the one that supposed to. Here's my html:
I'm working on a website where I need some help with open and closing divs using javascript.
This is the website: [url]
As you can see I'm using a javascript to open each jeans style link, I don't know if this is the best way to do it, but it's how I've done it so far. If you click the "Frankie style link" at the bottom the div called Frankie will show and you will see a little image in that div that says "next wash". What I would like this link to do is to close the frankie div and open up another wich looks almost the same as the previous, the only thing that will change is the pictures actually.
I use a bunch of overlapping divs. They operate as pop ups i.e. user clicks button, calls function to show div, it also hides any other divs that might have been open previously i.e. only one div open at one time i.e sample code:
i.e. I thought that if I put the pop divs in another container i.e. another div, then told the container div to hide, then all the embeded divs will also be hidden. This did not seem to work
code to show ( overlay / modal window ) to the user when closing or navigating away from the page ( i want put in this window facebook share to make the user to share the page in his facebook ) , bytheway i wanna use it in my wordpress in every post could it be happen ?
On my site I have a news page, where users can read part of the news (trimmed with php) and then they click "Read more" to see the full news item. That item then comes up in a popup (using jQuery of course) and should be displayed. To get this to work I'm usingthisby including it like so:
This all works great with that one div. The problem is, my news will be coming from a MySQL-query via PHP in a while-loop and I need this effect applied to every single news item. What I tried is to do this:
how do I make this work? How do I make jQuery open only the news item I'm clicking on? I know it could possibly be done with (this) and maybe children() or something like that? But I'm totaly lost at the momeny, I've tried loads of stuff with the pieces mentioned above but can't get it to work and most times I just "break" the jQuery and the popup won't even come up at all.
I have a div with a height of 100 pixels.If the content is too much to fit in div, I want to show a 'Read More' link at the bottom.If you then click 'Read More', the div expands to full height so all the content can be seen and the link text changes to 'Read Less'.If you then click 'Read Less', the div contracts back to 100 pixels.I've found solutions that can handle the above situation, but I want to have multiple divs with the same class that all work independantly of each other.So I'd have the following HTML
I'm trying to piece together a little div which slides out and shows various links to sites like Digg, Reddit to share the story with. I've got it kind of working but when there are multiple divs on the page, named the same like in each article of a post on a Wordpress blog. Only the top ones work and the rest don't do anything...I'm trying to get it do something like the image => HereThis is an example I'm trying to get to work but the second "slickbox" div never shows
I'm trying to use nextUntil to select all the .cell divs between the .start-date and .end-date, the code works for the .cell's within it's .cal-container but if wont work over multiple .cal-containers.The code I have is$('.start-date').nextUntil('.end-date').addClass('fill-date');
I have a JavaScript that allows you to open 5 additional windows when you click on the button. It works properly when using Mozilla, but when you use IE7, only 1 window pops up not 5.
Getting myself back into jQuery and have an issue which I didn't previously fix, and was wondering if anyone would be able to assist me. I have multiple DIVs (up to 50 on one page) that I wish to individually be able to hide and close an extra DIV once pressing the 'Details' to show, and 'Hide' to hide the extra hidden DIV.
I am trying to get the height of a div that is inside 7 other divs. I noticed the height() method works with the first and second div, but it does not work after that.
Example : <div id="first"> <--------------------------- $("first").height(); works ![code]....
how to get the height of a div that is inside multiple other divs ?
I'm new to jQuery, and I'm having issues with showing my DIVs correctly. The problem with the script at the moment, is that it currently opens up every single .display div, whereas I only want it to open up the one which corresponds to the.input a.edit which I've clicked.
The script hides them individually, displays the hide button and makes the show button display correctly like I wish, but it's displaying all the the .display div's at the same time which isn't what I want. For reference here is my jQuery script:
I need to be able to fade in 3 divs but not all at the same time, I need one to fade when thats finished, fade in then the next, then the next. Can anyone help me with this? I assume its got something to do with queue's but im not 100%
$("#addURLSArea").hide(); $('.jqTransformCheckbox').click(function(){ if ($('#multCheck:checked').val() == 'on') { $("#addURLSArea").slideDown(); } else { $("#addURLSArea").slideUp(); }}); I want to use this 4 times on a form. How do I change this so I can have it target 4 different divs?
I have a group of 4 divs and I'm looking to use jQuery to animate them once, then have a delay using delay(), and then run another set of animations on them, putting the divs back to their original configuration. Here's the code that I have:
//only selectors called 'option1' are affected by delay, and not 'option1 img' or 'option2' $("#option1").showOption1().delay(3000).hideOption1(); //if i don't attach to #option1, delay doesn't work, but the animations that need to happen simultaneously work
[Code]....
will work from hideOption1() after the delay. The rest of hideOption1() is fired immediately after showOption1() finishes, ignoring the delay.
On the other hand, if I run line 5, all the code in hideOption1() runs simultaneously as desired, but ignores the delay entirely, running immediately after showOption1() finishes. How can I have all the code in hideOption1() run simultaneously after the delay?
I am trying to toggle multiple divs toggle open/closed show/hide with a slide left effect It works but is buggy if you click too fast [URL] I want to create this but control to content in the sliding divs [URL]
I am trying to arrange 15 divs into a 5x3 grid.The divs have an id of piece1, piece2, piece3 etcI figured I could run a loop wherein each div is positioned to the right of the last.For each div, I'm trying to store the current position and width into variables then move it to the right by the number of pixels the div measures widthwise.This would position 5 divs horizontally and I am still unsure of how to get the next row of 5 divs positioned under the first and so on.This is what I have so far:
JQuery for (var i=0; i<x; i++) { var pos = $("#piece" + i).offset();