jquery

Scrolling jCarousel by two doesn't work when there are three elements?

I have a jCarousel object that scrolls by two. It works fine most of the time, but if there are three elements it does not highlight the "Next" arrow, and you cannot click it or see the third element. Here is my javascript: $('.assets').jcarousel({ scroll: 2, itemLoadCallback: jCarousel_ItemLoadCallback }); ...

jquery dropdown checklist plugin question

I am using the jQuery plugin found here http://dropdown-check-list.googlecode.com/svn/trunk/demo.html Everything works great except when I need to populate the field on load for an edit page. So let's say I am using this control on a profile page. On the profile, the user can select many User Types. So when they create a new account, ...

jquery Troubles with binding to an element by id

Hi What im trying to do is that when the esc key is pressed on the text input field (id = txtSearch), some code will run. this is my code: $(document).ready(function() { $('#txtSearch').bind('keyup', function(e) { var characterCode; // literal character code will be stored in this variable ...

javascript drop down menu question

Hi, I'm trying to make a drop down menu using javascript/jquery but can't get my head round something. When you mouseover a menu item it needs to display a div below it which contains another menu, in a similar fashion to lots of javascript menus. The problem i am having is that when you mouseout of the menu item then the div needs to...

A few jQuery questions...

First of all, here is the site I am working on. I am trying to get a modal window to pop-up when elements in the Flash are clicked on. Which at this point I have about 90% working when you click on the warrior image. Below is a list of issues I am still trying to solve that I hope you can help me with... The modal background doesn't ...

jQuery animate opacity doesn't work properly on IE

I'm trying to use animate function to change the height and opacity for a DIV. The div has a image background in CSS, it works fine on Firefox and Safari, but when i test it on IE the background is being removed. This is my code: if (jQuery.support.opacity) { jQuery('#list_box').animate({opacity: '1',height: '300px',top: newTop},{dura...

How to call function outside of jQuery(document).ready with setTimeout()?

Hey, My code looks something like: $(document).ready(function(){ var cont = 0; function func1(cont) { //Some code here search.setSearchCompleteCallback(this, searchComplete, null); //Some other code } func1(cont); function searchComplete() { //Some code cont += 1; ...

Ajax request and callback update are triggering at the same time.

Hi All, I have some submit buttons that are defined in the following manner: <input id="add_200,231" type="submit" onclick="updatePage(401,27371,200,231)" value="Add"/> The corresponding javascript function referenced in "onclick" looks like this : function updatePage(slac,sci,tlac,tci) { var url = '/neighbouring?.state=add_cell&so...

Mac style fisheye menu with JQuery?

I found this: http://www.ndesign-studio.com/blog/design/css-dock-menu/ My problem, however, is that when setting I’ve tried everything, but I can’t get the toolbar to be FIXED to the bottom of the screen. I.e. If the page has enough text to scroll, the icons don’t stick to the bottom when you scroll. I got as far as setting #dock2’s ...

Two divs 50% each. Make middle draggable to make bigger or smaller

Alright everyone, is there a way to have 2 divs taking up 50% of the screen and have a bar in the middle so you can drag it and make the left 40% and the right 60% and vice versa. I hope to be able to do this jquery. ...

jQuery returns true for "is:empty" check on appended html

A user can upload a picture on my site at which point jQuery inserts it into the page with append(). After appending I need to able to determine if there is something there or not, but jQuery's "is:empty" check returns true despite content having been appended. If I reload the page, the "is:empty" check will return false. It seems tha...

Finding the next hidden div and showing it with a jQuery selector.

Hello, I'm building a slideshow in jQuery that allows the user to see four images, and page through them, forwards and backwards by appending a new div with the image to the bottom via .load, and then hiding the top div. I'm very new to programming. I'm having trouble working out a selector to allows the user to go "back" showing the n...

Can a javascript function be ran on pageload instead of onkeyup?

I have this javascript code below that uses jquery, it is suppoed to be a password strength meter type thing. There is a html list with 3 items. Weak, Medium, Strong and as you type a password into a password form input, it will change the class/color of the list items. It's is mostly just for fun but I would like to make it work a...

Implementing "this is taking too long" message with jQuery

How to implement a gmail-like "this is taking too long" warning message using jQuery Ajax API? For those who have never seen this message on gmail, it appears when the 'signing in' process takes too long for completion, and then some solutions are suggested. I'm using jQuery Ajax on my website and I want to warn users when page loading...

jQuery .click function - prevent it from being called again until function completes.

I've written my first bit of proper jQuery for an image slideshow, that allows users to scroll up and down through some images: $(window).load(function(){ $('.scrollUp').click(function(){ $('.cardWrapper:visible:first').prevAll(':hidden:first').slideDown(function(){ $('.cardWrapper:visible:last').slideUp(); }); r...

Codeigniter + jquery: specify MIME type text/xml in ajax request response

I am making an ajax request from a jquery script to one of my ajax controllers in codeigniter. This process works fine when using data type json. However, when I want to send xml back from the server, the jquery documentation says that the server must specify a MIME type of text/xml. How do I do this with codeigniter. My ajax call loo...

computing $(this).css(”width”) _correctly_ in Safari

Asked this question earlier today, but I think I awarded a correct answer too early. I'm trying to figure out how to grab the css length and width of an anchor element with jquery in Safari. But I keep getting "0" returned, and I was told that this was because the javascript is firing before the css is rendered - a quirk of Webkit browse...

How to set a defualt tab with Jquery UI

I'm using Jquery and Jquery UI with the following: $(document).ready(function() { $('#tabvanilla > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } }); }); Right now it automatically sets the first tabs as the default tab that is selected when the document loads. How do I override this and make the second tab the default selecte...

jquery ajax with two service calls

Is there a better to write the following? I have two services that I need to call. The data returned from the first service is needed to create the url for the second ajax call. $.ajax({ url: 'http://service', type: 'GET', dataType: 'json', timeout: 1000, error: function(){ alert('Error loading jso...

Why doesn't IE7 think these two strings are equal?

I have an event handler that will remove an element from a list of the corresponding checkbox is unchecked. In the handler for the click event for the checkbox, first I copy the value of the label for that checkbox: var label = $(this).next().html(); Then, I iterate over the list items and compare each of them to that label: $("#so...