jquery

jQuery event.keyCode 0 when Swedish keys å, ä and ö are pressed

Hi! I have an html form with a lot of text fields that all take only one character (think crossword puzzle). When a letter is entered in an input field, I use jQuery to jump to the next one. This works fine, except for the Swedish characters åäö (other international characters are probably affected too). I bind an event listener to the...

Why $('a.current').parent('li').addClass('current'); is not working?

Why $('a.current').parent('li').addClass('current'); and $(this).hasClass('current').parent('li').addClass('current'); are not working? a click event must add li.current http://jsfiddle.net/laukstein/ytnw9/ Update: Dropbox is Down, so I updated http://jsfiddle.net/laukstein/ytnw9/1/ with full JS $(function(){ var list=$('#lis...

jQuery - CSS DropDown Navigation Items - How to build a Carrot Dropdown

Hello, I'm interested in learning the smart, elegant way to build navigation items throughout a site that have the carrot that when clicked expands a list of menu items. I would like for the menu items to be built dynamically (not necessarily all with ajax). But they shouldn't be hard coded on the page. That appears to be how sites lik...

jQuery AJAX and VBscript - Can't get values in VBscript variables when using POST in the jQuery AJAX

I am having trouble getting the VBscript on a .asp page to assign values to variables which are sent by the jQuery ajax() function. I have this code on several other sites and it works fine, but for some reason it won't work on this website. Just in case it makes a difference we are running the sites through IIS7. The issue is that th...

CSS & Jquery drop down menu: the third level that 'over-passes' at the right edge of window

I have problem with the third level of a drop down menu, which 'over-passes' the right edge of the document window when you hover it's parent, you have a look here to see what I mean, if you hover 'Accounts' -> 'Manage', http://ec-ener.eu/dump/index1.php I want that third level to 'float' to its parent's left when it 'auto-detects' th...

Jquery Validation plugin custom required text

Hi All, I am using the Jquery Validation plugin (http://docs.jquery.com/Plugins/Validation) to valid a form on my page. I am using the "required" class to validate an input on my page and want to show custom required text when the field is empty. How can I do this. Code is as follows: <script> $(document).ready(function() { ...

jQuery Scroll Plugin

Hi Folks, I just included jQuery jScrollPane plugin in to my page and it seems to be working fine except one small issue. I want to decrease the size(height) of scrollBar tab (where we click to drag the scroll bar up and down). I have attached the current snapshot of it as you can see how long it is. On the example site, it...

$.post form with facebox and redirect

Using Facebox with .NET (Web Forms) is painful--this primarily HTML site was designed by someone else. I may have IIS (7.5) issues as well. This Facebox pop-up is in a separate file, login.html, that is called from index.html: $k('a[rel*=example_2]').facebox_1({ loading_image : '/images/loading.gif', close_image : '/images/closela...

Javascript, local copying of a variable's value... struggling to achieve it

I have what i thought was a simple javascript / jquery function (fade out of one div, fade into another... loop until it reaches a maximum and then start back from the begining. The problem i have though is that to fadein the next div i need to increment the global counter. Doing this increments double increments it because i'm assuming ...

jqGrid - how to reset search options?

Using jqGrid multiple searching how can you programatically "clear" the search options? The "clear" should ensure no filters are being sent to the server and that the GUI search box does not contain any search criteria.. We are currently calling trigger("reloadGrid"). We'd like to call a clearSearchCrieria() type method before reloadG...

How to write an index loop for a json object

I have an image updater. I am loading by JSON the exact same file/partial that show my images. I would like to write a loop that runs through an index and replaces every image with its equal. This is the first div in my json object : [{ "photo": { "position":1, "photo_file_size":45465, "created_at":"2010-10-05T09:51:13-0...

Send an image onchange through AJAX

Hi. i have this code : <input name="userfile" onchange="loadPlayerPhoto('1')" type="file" value="fotog"> function loadPlayerPhoto(photoid) { $.ajax({ type: 'POST', cache: false, url: './auth/ajax.php', data: 'idp='+escape(photoid)+'&id=loadplayerphoto', success: function(msg) { $(...

How to change specific text of mutiple classes

Hi there, I'm cloning a fieldset and incrementing the attribute names as a new clone is created. However I want the same to happen if I delete I clone so that any cloned fieldset after the deleted will fill in the gaps. As in, if the 2nd clone is deleted, the 3rd with be renamed as the 2nd etc. I'm trying to change a the classes and ID...

How to unit test client-side jQuery/Javascript inside ASP.NET MVC?

Microsoft has really been pushing ASP.NET MVC, and one of its major strengths over ASP.NET Web Forms is unit testing. Then, they announced that they would support jQuery as their official client-side library for the platform, automatically including the source in new projects. Recently, they announced their first official contributions t...

Jquery autocomplete on large array

Hi all, I am using Jquery autocomplete with local array of size ~5000, every word is ~10 chars. I am initializing the object like this: .autocomplete({matchContains: true, minLength: 3, delay: 700, source: array1, max: 10, highlight: true }) The problem is, that when I start to type, it takes a lot of time (sometime crashes the brows...

How to add an HTML attribute with jQuery

Well, I have this jQuery image slideshow that uses the attribute "control" inside an <a>. Seeing how it didn't validate I searched for a way to add this attribute inside my HMTL via jQuery but I didn't really find anything relevant. Now I don't really care about how valid my page is, but I'm really curious in how to add an HTML attribute...

Jquery: IE window width

my computer screen width is 1280 but why IE says it's 1259 but other browsers say 1280 with widht();? $(document).ready(function(){ alert($(window).width()); }); can it be fixed for IE?? have a look here, http://ec-ener.eu/dump/index3.php Thank, Lau ...

chrome extension to pass current tab url to remote json search then parse results into an html table.

I am trying to make a chrome extension that allows to me to take the url of the current tab and pass that to a 3rd party website search. This php returns JSON formatted text. I would then like to format this JSON as a simple html table. pseudo code: function getUrl(){ currentUrl = the current tab url } function search(currentUrl...

how to append option text to a list in jquery

Hi. I have a tried a few things to get this to work with no luck. I have a select box with a button next to it. When the button is clicked, the text from the currently selected item needs to be placed inside li tags and appended to a ul inside another div. <!--select box--> <div class="select-div"> <select id="select-pub"> <option val...

having a problem with jquery votes just like stackoverflow votes?

i have this jquery code with an ajax request that works fine, but the jquery is not displaying the results(vote_count) and changing the upvote image, just like stackoverflow: jquery code: $(function(){ $("a.vote_up").click(function(){ //get the id the_id = $(this).attr('id'); //the main ajax request $.ajax({ ...