jquery

How to create a php (jquery) slide toogle information directory

Hello, I am trying to make a directory which contains information in a div, some of this information is going to be hidden and some of it is going to be displayed. When you click the click me button for each directory it displays the hidden information as shown with the code example below, Note: The information and divs will be generat...

Jquery - Send only some value from a form

Hi. I have this code : <form onSubmit="return checkTL();" method='POST' action='./index.php?general=example3' name='addtl' > <div class="sideon" id="sideline0"> <input type="text" id="inputside0" name="sides[]" class="inputTLS" maxlength="50" /> </div> <div class="sideoff" id="sideline1"> <input type="text" ...

jQuery get attr id of an active image

Hi all, Im stuck on some jquery, and I dont know why it isnt working... $('img').click(function() { $('img').removeClass('bob'); $(this).addClass('bob'); }); var test = $('img.bob').attr('src'); $('div.button').click(function() { alert(test); }); basically i need to get the attr ID of the image selected, but the alert on...

jQuery slideUp/slideDown issue

Been having a problem making a jQuery slider, I have a list of links that reveal the corresponding information. Different links have different content, so have different heights.. It works but the problem I'm having is when new content of a different height is appended, the slideDown() slides to the height of the previous content (altho...

Jquery SerialScroll: continuous both left and right

Hi! I was wondering if someone could help me.. I've been looking all over for a scroller that fits my needs. I want to be able to make a scroller that scroll continuously to both left and right, as long as the left or right button is hold down (using onmousedown). SerialScroll is the scroller nearest my widh.. However, my tries haven't ...

Force a checkbox to always submit?

I have an html form and i would like ALWAYS to have checkboxes to submit a value. How can i do that? I have one idea but i havent tried it and i am unsure if its the best way to do it (jquery to check if the box is checked or not, then set the value to 0/1 and check it off so it will submit) ...

Checkbox tree implementation - get selected checkboxes

I need to implement a Checkbox tree and I came across this component called jstree. It is a jQuery component and unfortunately I have no experience with Jquery. I followed the documentation and I have implemented my checkbox tree. The problem is with finding the selected checkboxes upon some event,say form submit. The API says,.get_check...

jQuery checkbox undo solution

<table> <tr> <td> <div> <input type="checkbox" id="home1">Home1</input> <input type="checkbox" id="home2">Home3</input> <input type="checkbox" id="home3">Home3</input> <input type="checkbox" id="home4">Home4</input> </div> </td> <td id="selectedhome"> </td> </tr> </table> <input type="button" value=...

jQuery Post to modify existing JSON

Hello, I am wondering if it is possible to modify an existing JSON file on my server using the jquery post method. If not, is there any other function/library that people use to achieve this goal? [ "Soon", [ { "body": "", "when": "lunchtime", "item_types": [ 5 ], "author": 3, "rev": 1, "joinin...

get index value of an element from XML using jQuery

New to jQuery, I have a script that returns data from an XML file. What I need is the index number of the element returned. I know I can retreve a single element with this name = $("sitelist:eq(1)",data).text(); but in my script I need to know each element position for the displayed data. something like position = $(data,eq).value ...

Auto-scrolling in jQuery.scrollTo / jQuery.serialScroll works like crazy

Hi, I used the following tutorial to make a parallax content slider for my webiste: http://blog.themeforest.net/tutorials/create-a-funky-parallax-background-effect-using-jquery/ I got it working nicely, but wanted to add auto-scrolling functionality. I did it by adding jQuery.serialScroll and using setInterval but it works like crazy n...

Is there a way I can make ajax requests always go in order?

Hi SO, What I'm currently doing is using jQuery to perform an ajax request on every keypress. So if my user typed d-o-n-k-e-y, it would send one request for each letter. However, since they take different paths to the server on the network, if they type d-o-n-k-e-y too fast, they don't always arrive in order. They might arrive as D-n...

Bind a key (for page transition with backspace) only if the key is NOT pressed in an input field?

Hi, i don't know why, but i got this already to work but today it stopped working. The base code is: $(document).bind("keydown", function(e){ if (e.keyCode) code = e.keyCode; // für alle Browser else if (e.which) code = e.which; // für ie if(code==8) { $("#outer-frame").fadeOut(400, function (){ //conten...

How do I Work with Overlapping layers and links in JQuery?

Working with Overlapping layers and links in JQuery tr______________________________________________ | td | td | td | | checkbox | content | content ____| |_____|__________________|_______|alink__| I have a table filled with value...

jquery vertical scroll with mousewheel

Hi I have div containing images that I want to scroll up and down using the jquery mousewheel plugin. Not sure how to do this, the documentation is not very helpful would be grateful for any suggestions. <div class="innerScroll" style="float:left;width:448px;height:500px; overflow:hidden;"> <div class="mediaPanel"><img src="media/poste...

Javascript: jQuery UI Slider doesn't detach from tracking the mouse after an alert();

Hey, I'm using the jquery ui slider as a submit button cos it's cool and it's a good validation method as it's not as disturbing as captchas. When there is a validation error with the form, I do the following: alert('Error with name'); $('#slider').slider("value", 0); When the user clicks OK on the alert, the slider handle is still c...

JQuery UI: How to use the progressbar to make a horizontal bar graph?

I am trying to use the progress bar for a non-traditional purpose. I want to use the functionality to display a horizontal bar graph of two values retrieved from a database. My PHP/MySQL/JQuery: // retrieve results for display $query = mysql_query(" SELECT furniture_purchases, electronics_purchases FROM sales WHERE store_id = $storeId...

File drag&drop, detect when dropped outside ?

I'd like to modify the default behavior of my browser when drag&drop-ing a file in my webapp (html5). By default, if you drop a file outside a dropable box the browser tries to open it and quit the current page. On gmail, this is desactivated! Have you got an idea how this is done ? I was thinking about the onbeforeunload event but it ...

Append and Slide together jQuery

I have this append method which I made to add more input boxes until there is 10 of them which will disable into making more. i = 0; $('#add-link').click(function() { if(i < 9) { $('.insert-links').append('<div class="new-link" name="link[]"><input type="text" /></div>'); i++; } if(i == 9) { ...

Why does jQuery "toggle" button trigger the Submit button on a form?

I have built a fairly complex form which includes a hidden section that the user can toggle open for entering more information if necessary. However, when you click on this toggle button labeled I have more Nativities, it triggers the submit button and prematurely submits the form. The form is in dev right now, but it can be found here....