jquery

Simple jQuery current selection function??

I have a few lists, and when a user clicks on an item I would like it to change the class to current, but if a users then clicks on another item in the same list to switch that to current and remove the current from the previous item selected. any quick examples, i know this is probably out there already but couldn't find a good examp...

Why isn't this simple jQuery code working?

I am only 2 days into jquery so I'm probably making a simple error here. Basically I have a input field that when clicked gets a blue border around it (doing this by having a css class be added to the input field on keyup and the css adds the border color). On keyup the submit button also shows. The only other thing I want is to show a r...

JavaScript: Saving certain data to a csv

I understand that JavaScript isn't really made to open and save files. The best method I've seen to get this to work is to use a form and then POST all the information I need to a PHP file that can than save the information I want to a file. I plan on producing this kind of data and storing it to a csv: Name,Low,High,Number Using inpu...

jrails_auto_complete setup help

I have been struggling to get a simple autocomplete working with my Rails app using the jQuery UI 'autocomplete' I'm already using jRails, so I tried using the jrails_auto_complete I set it up like it says in the README, but I get the following javascript error when I start typing in the box: Failed to load resource: the server respon...

Using LEFT JOIN inside datatable server side script

dear all, i'll take some data from the database. and join two tables.the code like: SELECT DATE(A.Inspection_datetime) AS Date, A.Model, COUNT(A.Serial_number) AS Qty, B.Name FROM inspection_report AS A LEFT JOIN Employee AS B ON A.NIK = B.NIK GROUP BY A.Model, A.Serial_number i want show this data using jQuery dataTable....

Superfish Hover Issue with IE6 and Apache Logs

Hi, Hoping someone can assist as well as explain the following: I am using jQuery Superfish menu on ie6 and from what I can see from the apache log files for my session, is that whenever I hover over a menu item in my Superfish menu that has sub-menus, depicted with menu item that has a white arrow head image to the right of the menu i...

jQuery over loaded ajax content

hello, I'm using fancybox plugin to show bigger images. if I put in the html page <a id="fancy" href='img_big.jpg'><img scr="img.jpg" /></a> it works fine, but if load with load() the same lines fancy box is not applied. how can i fix that? ...

jQuery GET Not Working

To preface this, let me says that I'm.. 'newish' to jQuery. I have the concept and most of the usage downpat, but I'm not perfect with all these brackets and functions yet. Hence why I'm probably making an amateur mistake here. I am using the following code to submit some data, move to the next section of the page and then attempting to...

multiple div in .html()?

var div1 = $("<div>"); var div2 = $("<div>"); var div3 = $("<div>"); $('#container').html('').append(div1).append(div2).append(div3); What is the best way to do this? Thanks. ...

Check if an element exists in the DOM

The following snippet is not working for me. Basically I want to check if there is an input element with the name "documents[]" and the value item.id and return void. I thought this line would do it: $("input [name='documents[]'][value='"+item.id+"'") != false. However the statement returns true every time. I have looked at the docume...

jquery add width + padding;

hi there, i am trying to do var width = ($(this).width() + $(this).css('padding-left') + $(this).css('padding-right')); do add the width to the padding, so i should end up with width = 200 + 4 + 4 = 208 instead i end up with 2004px4px; how can i force it to add them to get 208? ...

display jquery returned data correctly

hi...i've been a prototype user for a few years, and now for several reasons, i'm moving to jquery.. but still have yet familiarize myself with jquery's syntax.. my question is how do I convert this prototype code to jquery correctly? new Ajax.Updater('displayArea', 'shoutbox.php', { method:'post', parameters: {action: 'display', s...

Jquery sortable plugin makes row length smaller while dragging

I am using jquery sortable plugin to sort the rows of table. It is working fine but the problem is i have e,g table row length = 500px. but while i am dragging the row , the row looks only 200px. Is there any way so that while dragging as well the row length remains same The html of table is <tbody id="sortme" class="ui-sortable" s...

jcarousel or any other image slider that looks like that

Hello, I've been looking for a image slider just like jcarousel with infinite loop, (circular) anyways, I wanted something that when I press the next button only moves one image, but I was ok with jcarousel, the thing is every site I see with the demos work fine in chrome FF etc.. all but IE, here's is an example link text I just want...

Setting a cookie to prevent music from playing

OK, some I'm using jPlayer for some music on my site, and I have an opt out functionality that I would like to implement here, but I need a little help getting started. So, I've set a cookie: $.cookie('autoPlay', 'no', { expires: 365 * 10 }); So, I like to set up a conditional as follows: if(cookie == 0) { noMusic; } else { play...

Autocomplete always stays on, how to make disappear with mouse click

I am having issues with jquery-autocomplete if i start typing then the results / suggestions would show.. but i want to be able to have then disappear when someone clicks somewhere else on the page, and if possible when the user hits escape. thanks in advance. i would like it to work like the tags textbox when submitting this questio...

Help to make jQuery simple

How can i make this shooter. It does what it should but it is very long. Oh and I need to run a function for each number. This is my HTML <div id="moremenu" class="hide"> <ul> <li>View count</li> <li>Click count</li> <li>Profile</li> <li>Inbox</li> <li>Uploads</li> <li>TV</li> <li>Notes</li> <li>More</li> </ul> </div> <div class="stat...

problem getting a json multi dimensional array to work with jquery getJSON

i'm using jquery.getJson() to retrieve a json object created by my php script. it works if i remove the locations array. however i need the locations array to populate a combobox. my formatted json is below. any suggestions how i can get this to work with one json query instead of 2. { "ContactID" : "1", "CustomerID" : "1", "FirstName...

Accessing from the page in LowerFrame to the page in UpperFrame causes undefined error!

My website consists of two frames, let's say upperFrame and lowerFrame. On the document ready of the page in lowerFrame, it access one of textbox located on the page of upperFrame. Sometimes, since the upperFrame do NOT complete its loading, lowerFrame get the undefined while it access the upperFrame. Let me know if there are Any solut...

Stop page scrolling from focus

I just installed a script to focus at my first input field, which is toward the footer. The focus works great, but the page scrolls to the bottom after loading. Can I still use the focus and stop the page from scrolling down to the first input field? http://www.ubspack.com/ ...