jquery

get value of checked[ALL] or unchecked box jquery

I have read this. http://stackoverflow.com/questions/2048485/jquery-checkbox <input type="checkbox" name="checkGroup" id="all"> <input type="checkbox" name="checkGroup" id="one" value="1"> <input type="checkbox" name="checkGroup" id="two" value="2"> <input type="checkbox" name="checkGroup" id="three" value="3"> <input type="hidden" nam...

javascript evaluated width in a nowrap element

I'm trying to develop a newsticker plugin, while i was making the sliding part i got an issue with calculated width, all seems to be correct but when i get into the strip where i should calculate the width to slide the inner content i get a width lower than what i expected. The mask has right offset width, but i can be sure if inner con...

jQuery UI datepicker prev/next broken

Ok, I'm using the jQuery UI datepicker as a replacement for the terrible AjaxToolkit datepicker, but I've run into an issue. For some reason, the datepicker's prev/next buttons no longer exhibit the correct behaviour, and instead move from this month (selected as default) to december 1899 for previous and january 1900 for next. Can any...

How to dynamic call property on javascript object with jQuery

Hallo all. I got a javascript object with some propeties let's say function Animal() { this.id; this.name; I need to call id function in a dynamic way to get and set its value: something like this Animal animal = new Animal(); var propertyName = "id"; animal.+propertyName = "name"; Is there an elegant way to do it? With jQuery? Ki...

jQuery - Set all cookies ending with

I'm wondering if it's possible to use a wildcard to select multiple cookies. I'm using jQuery to save various scroll position and would like to clear them out in one go. At the moment I clear them out individually as below function clearScroll(elementID) { if ($.cookie) { $.cookie(elementID + '_scrollpos', 0); } } ...

collapse jquery treeview plugin when focusing on another element

Hello all, Is there a way to have the jquery treeview plugin automatically collapse when a user focuses on another element. More detail about what I am trying to do: I have a form where a user has to select an item from a large selection. To make this easier I have set up a small list of 5 commonly selected items each with associated ...

What damage is done by document.write()?

What bad things happen at the moment document.write() is invoked? I've heard bits and pieces about document.write having an adverse impact on the DOM or on the use of Javascript libraries. I have an issue in front of me that I suspect is related, but have not been able to find a concise summary of what damage the method does. ...

How add default value JQuery Tokenizing Autocomplete ?

I am using jquery autocomplete. I want, add default value when loaded page. I added input value tag. But, did not work :( How can I do ? ...

is this correct use of jquery's document.ready?

The below file contains all the javascript for a page. Performance is the highest priority. Is this the most efficient way? Do all click/hover events need to to be inside the doc.ready? //DOCUMENT.READY EVENTS //--------------------------------------------------------------------------- $(function(){ // mark events as no...

I have JavaScript code at the bottom of the page but images still load after?

I'm referencing my JavaScript files before the closing body tag, hoping they will be parsed last (as they're not needed until last). However when I analyse activity with PageSpeed in Firebug, the images seem to be requested last. How can I make the images higher priority than the JavaScript code? ...

jQuery removing elements from DOM put still reporting as present

Hi, I have an address finder system whereby a user enters a postcode, if postcode is validated then an address list is returned and displayed, they then select an address line, the list dissappears and then the address line is split further into some form inputs. The issue i am facing is when they have been through the above process th...

jQuery PrettyPhoto/Lightbox with Loupe Magnifier

I'm trying to crowbar a magnifier, like this one, into prettyPhoto (picked because the JavaScript is nice). The trouble I'm having is initiating the loupe function when the prettyPhoto has loaded. If I include it in the prettyPhoto JavaScript, it just gets itself into an endless loop, or doesn't get called at all. I've nearly got it work...

How to assign,clear and get value of a hidden field in jquery?

Consider a hiddenfield in the page HfId <input type="hidden" id="HfId"/> How to assign,clear and get value of a hidden field in jquery? ANy suggestion... ...

IE innerHTML chops sentence if the last word contains '&' (ampersand)

I am trying to populate a DOM element with ID 'myElement'. The content which I'm populating is a mix of text and HTML elements. Assume following is the content I wish to populate in my DOM element. var x = "<b>Success</b> is a matter of hard work &luck"; I tried using innerHTML as follows, document.getElementById("myElement").inner...

jQuery - How to remove a DOM element BEFORE complete page load

Now this may seem like a silly question, but I need to know how to remove a DOM element BEFORE it is displayed to the user. In short, I am using a div that has a background image alerting the user to enable javascript before proceeding. If the user has javascript enabled I am using jQuery to remove the DOM element, in this case $(".check...

What is wrong with these jquery statements?

I cant able to get this jquery statement to work on page load but it works once when i refresh F5 the page..... <div id="ResultsDiv"> </div> <div id="pager" class="pager"> </div> <input id="HfId" type="hidden" /> <script type="text/javascript"> var itemsPerPage = 5; $(document).ready(function() { ...

jQuery Autocomplete Json Ajax cross browser issue with Google Search Appliance

I am implementing a jquery autocomplete on a search form and am getting the suggestions from the Google Search Appliance Autocomple suggestions service which returns a result set in json. What I am trying to do is go off to the GSA to get suggestions when the user types something in the search box. The url to get the json suggestions i...

How to make this effect accessible for screen-reader and without JS

Today i found a good example to make whole div clickable in coolway. http://is.gd/b9xQm Is there a way to make this effect compatible with Screen-reader and keyboard user and even at least accessible if JS disabled (using css hover). Atleast link should be shown somewhere if JS is disabled. ...

Apply jQuery UI widgets to ajax loaded elements

I want to activate the jQueryUI button widget on a given selector, lets say '.button'. Whats the best way to automatically activate the widget on any new '.button' elements inserted to the DOM after the initial page load via ajax. Previously, I used the livePlugin with code something like this: $('.button') .live(function(){ ...

JQuery Ajax help

Hi. I am creating a portfolio page for m personal site. I have a slider with a bunch of anchors that relate to projects I have worked on, each one contains a client logo that when clicked should load a html page into a div on the same page. I would like to use JQuery to achieve this my question is which method would I use load() or ajax(...