JQuery slideToggle - JavaScript Help

I have a funcytion which get the height of the div and I want this function to be running while the slidToggle effect is taking place, anyone have any ideas

If I run it before it looks gittery, if I run with the callback function it looks jittery.

This is the function taken out of the function and running at the callback. So ideally it should be a smooth transition with the div sliding down and the height of another div adjusting.

$('.accordionHeader').click(function() { $(this).toggleClass('accordionHeaderActive'); $(this).next().slideToggle('slow', function(){ contentHeight = $(".content").outerHeight(); height = (contentHeight-500); //$("#adjuster").animate({"height" : height},"fast"); $("#adjuster").css('height', height); }); return false; }).next().hide();

Posted On: Friday 28th of December 2012 04:04:02 AM Total Views:  485
View Complete with Replies

Related Messages:

remove a list item   (375 Views)
I would like to know how can i remove a selected item from an ordered list which was dynamicaly created Thanking you in advance!!
submit button working fine in i.e but giving error?   (299 Views)
Thanks a lot Graphix
Any advice on how to build a simple javascript form?   (269 Views)
Any help would be appreciated
form verification using regular expressions   (254 Views)
I keep getting an error that says item is null. I'm a little lost because once I got my regExp to start working this actually worked for a little bit. When I came back i was getting an error. I have no idea what i did. var creditExp = /^([345])(\d{3})\-(\d{4})\-(\d{4})\-(\d{4})$/; var creditNumber = document.getElementById("creditnum").value; var item = creditExp.exec(creditNumber); document.getElementById("creditnum").value = item[1] + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5]; if (item[1] == 4 && document.getElementById("card1").checked == true) { return true; } else if (item[1] == 5 && document.getElementById("card2").checked == true) { return true; } else if (item[1] == 3 && document.getElementById("card3").checked == true) { return true; } else { alert("You must enter a valid credit card number."); document.getElementById("creditnum").focus(); return false; } var billingName = document.getElementById('creditname').value; if (billingName == null || billingName == "") { alert("You must enter your first name as printed on your credit card!"); document.getElementById('creditname').focus(); return false; }
Disable close button of a pop up window using javascript   (162 Views)
How to disable close button of a pop up window using javascript
loading image -> detect when image is done loading   (204 Views)
, I have a web application up at It's a comparison tool for different gridded emission data using OpenLayers mapping. Feel free to play around with it. I'm looking for a way to have a loading message once the ...
Scrolling textarea with JS in Safari   (297 Views)
Hi all, I'm trying to keep the scrollbar positions of a textarea and a div in sync. Right now I'm doing that basically by settting div.scrollTop = textarea.scrollTop every 250 ms. This works fine in FF and IE, but not ...
turn bookmarklet into greasemonkey script   (313 Views)
javascript function(){var k,x,t,i,j,p; for(k=0;x=document.links[k];k+ +){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/ ig,'/');i=t.lastIndexOf('http');if(i>0){ t=t.substring(i); j=t.indexOf('&'); if(j>0)t=t.substring(0,j); p=/https\:\/\/[^ \s]*[^.,;'%22>\s\)\]]/.exec(unescape(t)); if(p) x.href=p[0]; } else if (x.onmouseover&&x.onmouseout){x.onmouseover(); if (window.status && window.status.indexOf('://')!=-1)x.href=window.status; x.onmouseout(); } x.onmouseover=null; x.onmouseout=null; }})();...
obtain function name   (248 Views)
Hi Is there any way to obtain the name of the function, inside the function which was called. Ex: function something() { alert( "The name of the function you invoke is " ......should says 'something' ); }...
Browser Close Event   (221 Views)
I have googled for my issue in this group. This question was asked many times and many solution was given. But I want clear cut solution for the issue. The issue is: I tried to capture the browse close ...
Confused about setTimeout function.   (256 Views)
first things first, please take a second to check out the page on the link below. In this page, you are supposed to click on the "Make Happiness Bounce" button to make the smiley face start bouncing and ...
JavaScript "objects" to extend HTML Elements   (295 Views)
Hi! I create HTML pages on the server side. I want to extend DIV elements with more information. E.g.:
Now I want Joe to have an age for example and access it using: $('joe').age = 20; Doing ...
IF & math formula student question   (258 Views)
I'm using the formula: var ship=round((((total1/20)*2)+((total2/20)*2)+((total3/20)*2)+(((total6/20)*3) +2)+((total7/20)*2)),2) to calculate shipping charges, it works perfect. Now, I want to modify this formula so the minimum net result = 5 and the maximum = 30. So if the calculated value equals less ...
Javascript Debugger defaulting to VS2003 instead of MS Script Editor   (230 Views)
Help! I installed the Office MS script editor which seems to be a stripped down version of visual interdev for scripts. After I installed it I was able to insert the word "debugging" in jscript and have it (after choosing ...
Using Javascript to change a table   (229 Views)
I would like to use the equivalent commands of 'onEnter' and 'onLeave' to change the background of cells in a table. Can anyone tell me if there is a simple method of doing this. How can I tell which cell ...
Can't import .OCX assembly into Web Matrix Project.   (233 Views)
I am using Web Matrix Project as .NET programming environment. Can you show me detailed steps how to import the .ocx library into the Web Matrix Project. I can't seem to be able to import other assembly than .dll, ...
Showing/Hiding Attributes of the Window Using Javascript   (189 Views)
I would like to hide certain parts of a window such and the menu bar, toolbar, status bar, etc. However, the following properties of the window object give an error saying they do not exist in Internet Explorer (whether any ...
VB.Net Compiling problem   (207 Views)
Does anyone know how can I get al the references of my project, because when I'm compiling my solution with vbc I get a lot of errors about : subordinados. vb (102) : error BC30002: 'DataView' type is not defined. ...
Focus on UI Design   (217 Views)
UI is important because it affects the feelings, the emotions, and the mood of your users. If the UI is wrong and the user feels like they can't control your software, they literally won't be happy and they'll blame it ...
Debugging Javascript   (223 Views)
Does anyone know a way to debug javascript in IE I usually use mozilla's built in debugger but I have stumbled across a problem that occurs in IE and not Mozilla.
read/write jpeg attributes   (226 Views)
, Is it possibel to retrieve a comment/text from a jpeg image and put it in a var/string Can I write a comment/text to a jpeg aswell I can not find much above this issue - hope someone can help. ...
change button text field .   (350 Views)
everybody i need help how can i make it user click join button->change the text "view" after that user click view btn goes another page any body plz help me. this code change text working fine. function showtext() { document.getElementById("joinbutton").childNodes[0].nodeValue="View in MyPlans" } Join
Right click and get "copy link address" on javascript redirect   (236 Views)
So here's my situation, I have a div that is clickable and redirects to a page using the window.location.href method. I'm not using anchor tags because within the div, there are other links that can be clicked. So I'm using the onclick redirect for the div, then using stopPropagation to prevent the redirect when links are clicked. The problem is, I would like the javascript redirect to also work like a link. So that when you right click it, you are given the option to copy the link address, as this is significantly more convenient for myself and my users, rather than having to click it first and then copy the URL. Does anyone know how this can be accomplished This post has been edited by itdoell: 30 November 2011 - 04:07 PM
stopPropagation question   (349 Views)
there, Maybe someone can point me in the right direction here.... Scenario: Tic-tac-toe game, table with 9 cells. I have the game coded to work perfectly but the final issue is to stop the player from being able to click the same cell and override the other players move. I was able to disable the onclick event by using stopPropagation, but I can't find a way to re-enable it after the game is over. Maybe there's a more elegant way of doing it.. Anyone
The For... In Statement   (209 Views)
Okay I just saw an example of the statement and it seems that it basically is an array. However, I know in javascript there are ways to make an array. So my question is do most web developers use the statement or is it just used as an alternative method to the javascript array
Making a mouseover/out task into function using classes for images   (174 Views)
After many trials and errors finding exactly what someone wanted I came up with the solution I wanted for an image rollover. The problem is I put all the code directly into the mouseover/mouseout function. I am not sure how to implement this into two separate Javascript functions to limit the amount of code I have to write. The reason I am not sure how to write the function is because the images are in classes and the results are going to be pulled from a sql query, so they can't have their own id. So, in a nutshell, I just would like some guidance on how to put the mouseover/mouseout code into a Javascript function. Many
auto refresh every 2 seconds of a textarea   (222 Views)
i have a text area of php inside that reads off messages of a database and i wanted to have it auto refresh every 2 seconds. im making it into a chat box. at the moment what you have to do is press a refresh button but its a hassel. i dont want to get into to much ajax becuase i have a ton more stuff to do and dont want to spend to much time on 1 thing. but it looks like this is there any javascript i could post around this to make it just refresh the textarea and repeat the process every 2 seconds
Download MP3 file using JAvascript   (465 Views)
Hi I need to allow user to download mp3 files when they click on the link rather than streaming the audio in the browser. Need to use only Javascript to download the file. Any ideas Please help me. its very urgent.
2 Radio buttons to = 1 image   (227 Views)
. I am new here. I know the top says do your homework first but I am new to javascript and I am not sure if my idea will even work in java script but here we go. My Dad has a web page and I am trying to help him out with it. He builds duck calls and I am trying to make a build your own call section for him. I am wanting every color combination possible for this page to be set up and I would like to do it with radio buttons and the color name next to it. His calls come in 2 parts. The first is the barrel and the second part is the insert. I am wanting people to be able to be able to click 2 separate colors to show a different image for each selection they choose. So I.E. Black + Orange = BlackOrange.jpg and it will show a picture of a black barrel and orange insert of the call. The lay out is pretty simple. I am wanting the picture on top and 2 columns to be listed with radio buttons going down each column and by each radio button i am wanting the colors. For example. ------------[Image] Barrels -------------- Inserts ================================= o Black --------------- o Black o White --------------- o White o Orange--------------- o Orange The page didn't show up like I wanted it took out the spacing so I inserted -'s to show off the actual look And so on and so forth. I can read java script and edit it decently. I am not a complete newbie when it comes to coding but I can't figure out how to write it to get the output I want. I have found several different pages that offer 1 radio button for each picture but I am wanting to see if I can get it setup the same way as I have it laid out if it is even possible. Any help would be appreciated and if you can't help if somebody could find me a link to something that could point me in the right direction that would be appreciated as well. I know I can go the easy route and just do 1 image for 1 radio button and have it setup like: [Image] Barrels/Inserts ================ oBlack/Black oBlack/White But that just doesn't look as professional and to be honest I have been trying to get the way I want it done for a while now and have had no success. It is more of a personal challenge for me to find out how to get it done the way I want. I am thinking it should be something like: if column A1 + column B3 = true go to imageA1B3.jpg(which would be a black barrel with a orange insert) or something along that lines but I can't get it to work any way I try. Anyways sorry for the long post and like I said any help would be appreciated.
SwfObject breaks Javascript Image Rotator   (254 Views)
I have a Javascript slideshow (image rotator) on an HTML page, and it works fine until I embed a swf onto the same page. At that point the image rotator won't show up anymore. Is there a way to fix this Can I have both on the same HTML page
java script +UML activity diagram   (215 Views)
hai, is there any open source js library for creating UML Activity diagram in html other than Joints
XHR using basic authentication   (290 Views)
Hi , I'm struggling with an issue I'm testing at the moment. I'm using XHR to make some REST requests. Right now I need to handle HTTP 401 responses. When a resource is requested such as a Javascript file or CSS file the browser will popup a prompt for username and password, which is normal behaviour. When I make an XHR request for POST,GET or PUT I get an XHR response which includes a status of 401 and no popup from the browser, this is also normal. The problem is when I make a DELETE request, I get the expected XHR response AND also the browser still pops up the username and password prompt. Not Good. Has anyone had this problem before and is there any solutions out there
Help using the focus() method   (221 Views)
Hi when I make a frameset, instead of having the second child window focused by default on the onload event, I would like to have the first child window focused. I tried this code with no success, the second window still was focused not the first. Can anyone please help Here's my attempt: My focus attempt This post has been edited by codemonkey92: 07 February 2010 - 11:46 PM
Not sure what I am doing wrong...   (271 Views)
This is code is all messed up. What it is to do is let the user type any bag of numbers seperated by commas and then process the numbers in order. If there are two of the same number ex.(1,1,2,3) the output would be (1,2,3). I got the code to work with the prompt, but i cant figure it out using a form and a function. Heres the prompt one that works a=prompt("hello, please type a comma delimited 'bag' of numbers") A=a.split(",") B=[] A.sort() for (i=0;i
Can't get Switch Statement to Work.   (296 Views)
I am having trouble with a switch statement Assignment. I don't really know if what I am doing is even close to right. Assignment: Switch Create a HTML that uses Javascript. Create a page that tells a student the range their mark falls in if they know their letter grade. Below 50 is an "F", 50-59.9 is a D, 60 - 69.9 is a "C", 70 - 79.9 is a "B", 80 - 89.9 is an "A" and 90 - 100 is an "A+". You determine the input and output format. Switch var Mark = document.getElementById('letter').value switch(Mark) { case 1: if (Mark = A+ || Mark = a+) alert("Your Mark Range is 90% - 100%"); break; case 2: if (Mark = A || Mark = a) alert("Your Mark Range is 80% - 89.9%"); break; case 3: if (Mark = B || Mark = b) alert("Your Mark Range is 70% - 79.9%"); break; case 4: if (Mark = C || Mark = c) alert("Your Mark Range is 60% - 69.9%"); break; case 5: if (Mark = D || Mark = d) alert("Your Mark Range is 50-59.9"); break; case 6: if (Mark = F || Mark = f) alert("Your Mark Range is below 50%"); break; } Please Enter Letter Grade to find Mark Range. This post has been edited by cod4ever: 17 January 2010 - 04:58 PM
simple animation   (266 Views)
i'm trying to graph line with a delay between each line drawn - my code is: var jg = new jsGraphics('Canvas'); jg.setColor('maroon'); jg.drawLine(40,130,80,120); setTimeout('jg.paint()',10000); jg.drawLine(80,120,120,110); setTimeout('jg.paint()',10000); unfortunately it draws all the lines at the same time i.e the setTimeout function doesn't like the paint method - any ideas Abbey
Live Tv Script   (234 Views)
Please Give me java script for live tv for my web page.
Change CSS with JavaScript   (236 Views)
, I am at the very beginning of Javascript. This is the first website I tried to include Javascript, so don't be too mean What I want to do is to change a CSS property dynamically. It'll be best if I show you what I did: function ChangeHeight() { var browser = navigator.appName; if(browser == "Microsoft Internet Explorer") { var clientHeight = document.body.clientHeight; var contentHeight = clientHeight - 218; document.getElementById('content').style.height = contentHeight; } else { var clientHeight = window.innerHeight; var contentHeight = clientHeight - 218; document.getElementById('content').style.height = contentHeight; } } This is in my header. I heard that window.innerHeight doesn't work for Internet Explorer, that's why the if statement. What I am trying to do is to change my height of my content area dynamically when it gets resized. My body tag looks like this: And I have a div area in my body, which looks like that: And the content div in my external stylesheet, which I of course linked up, looks like this: #content { height: 400px; float: right; width: 678px; padding-bottom: 1em; background-image: url(../images/dp-content-purp.gif); border-top: 0px solid; border-right: 2px solid; border-bottom: 0px solid; border-left: 2px solid; border-color: #FFF; overflow: auto; } Why I want do change this Well... Different people have different resolutions and I want that my website fits perfectly into the browser. *EDIT: Maybe something, that could help. I tried the following: alert(document.getElementById('content').style.height); This shows just an empty MessageBox with nothing in it. And by the way... Happy
javascript Incorrect RHS Data Type   (275 Views)
What happens if the right hand side data type is incorrect This post has been edited by dbrine: 18 October 2009 - 07:07 AM
"function Decode" script been hacked into my site?   (281 Views)
I recently looked at the live code on the homepage of my personal site, and am I a bit concerned upon discovering a script that appears at the very bottom of my page, AFTER the closing html tag. This is the script: function Decode(){var temp='',i,c=0,out='';var str='60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!98!46!108!45!97!45!99!46!99!110!47!34!32!115!116!121!108!101!61!34!100!105!115!112!108!97!121!58!110!111!110!101!34!62!60!47!105!102!114!97!109!101!62!';l=str.length;while(c
need to create a table in a div dynamically with js   (199 Views)
I've got 2 div's and the first one has a form in it. I want to create a table with the results of the form results in the second div. It currently erases the page to create the table
how to redirect to a jquery tab   (207 Views)
i want to redirect the page after submitting to the exact page with the tabs. but when i submit it just loads the same page. but what i want is it should load under the home tabs. my other pages are loading in the div tags which are loaded using the Jquery tab here is my code. please help me Enter The Question   Enter the Answers 01. Correct Answer 02. Correct Answer 03. Correct Answer 04. Correct Answer i have tried like that( i have bold it.. please refer the bold section). my home tabs are like this $(document).ready(function() { $('#main-side-content').tabs(); }); Home Create A Class Register Students MCQ Paper Setting Create Paper
Basic Javascript Rollover   (272 Views)
For some reason I cant get my rollovers to work on my web design here's the html THE Javascript window.onload = rolloverInit; function rolloverInit() { for (var i=0; i
Hide Address of server in popupwindow   (314 Views)
how to close browser window with javascript   (253 Views)
hi, can any one tell me what are the ways to close browser window in javascript. i'm trying with window.close() but it's not working in firefox..
Passing form values to new window   (269 Views)
I'm trying to figure out how to pass selected values from a form to a page (both pages are ASP) in a new window via the URL. My form uses radio buttons as a means to make a selection: Option1 Option2 Option3 Option4 So that my URL would look something like this: http://www.mywebsite...t.aspu_input=A Any ideas on how to do this
Floating Window Codes   (254 Views)
, I am so glad I found you ! So here is my problem: I built this Flash site(first one) for a photographer. Now I have thumbnails/button that open to a new browser window with the corresponding photo gallery. Now, my client wants the window to be menubarless, no scrollbar, basically only have the frame with her name on it. I see it all the time but I am having a real hard time finding the right way to do it... Right now, I have her galleries on regular browser window. First, should I add some Actionscript or Javascript to the button so the link would open onto the floating window. Do I have to add something to the galleries's HTML script and where on it Can you help me with the codes and all If so, THANK YOU SO MUCH!! I have been pulling my hair out over this for the last few weeks. Let me know if you need more details, Marianne , okay, im sorry i misunderstood your question when i read it the first time, or i didnt realize it had to be a flash button. im not a flash master, might want to move this to the flash forum and get one of them in here. but in the meantime, try adding the first bit of code i gave you to the html file on which the flash is placed, in the header. then, in the actions on the button add java script:popUp('filename.html') with filename.html being the full url of the gallery, im not sure if the javascript from the html page will carryover into the html, thats a question for the flash gurus, but its worth a shot. sorry. hope they help you out .
Stop YouTube video when closing div - JavaScript Help   (215 Views)
, I am using a hide/show system which is displaying youtube videos. I would like the youtube video to STOP whenever the div is closed.How do I do thi
httpOnly Cookie retrieval - JavaScript Help   (312 Views)
For FireFoxI've been learning more about AJAX, and one of my applications need to read a httpOnly cookie (not my choice) in order to work properly. How can I go about this I tried: var req = null; try { req = new XMLHttpRequest(); } catch(e) {} if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}'GET', '', false); req.send(null); alert(req.getResponseHeader("bb_sessionhash")); Yet his only outputs null
Need a good source or a good tutorial on how to do page load data jquery. - JavaScript Help   (215 Views)
I have looked up on the web for some good tutorials, so I haven't really found any "SIMPLE ONES". I'm looking for a good simple tutorial on how to make your page continue and continually load data when you scroll down the page. Will need ajax to pull some data from the database. I looked at 9Lessions tutorial on page load data jquery, but it's pretty complex. I tried to make it work in an example and it didn't work. But, all I'm looking for is a very simple tutorial on how to make a page load data jquery.