jquery

JQuery: Move Javascript to the bottom of the Page?

We are developing large ASP.NET applications with lot of dynmically created pages containing ASCX controls. We use a lot of JQuery everywhere. I have been reading that it would make sense to move the inline Javascript code to the bottom of the page as it could delay the loading of the page when its included "too early". My question is ...

Implementing A Draggable/Resortable Stacked List in jQuery

I'm needing to make this layout editor that uses a good bit of jQuery for letting one resort the items on their resume. I envisioned showing a dialog with a graphical representation of the sections, sort of like: [Details - locked -- immovable] [Overview -- immovable, but can be hidden or shown again] ----imaginary line where things can...

jQuery callbacks firing too early

I have a problem when assigning functions to the click event of a button in IE 7 with jQuery. Something like the following works fine in Opera but produces an infinite loop in IE: function updateIndputFields(index, id) { $("#reloadBtn").click(function(){ updateIndputFields(index, id) }); } As I understand it, an infinite loop would...

Minimalist cacheable jQuery/javascript library for iPhone?

Given the iPhone's 25k limit for caching of files, I'm wondering if there's interest in an iPhone optimized javascript library that makes caching a top level goal. Since it'd be iPhone only it could get rid of most cross-browser cruft and rely on safari specific capabilities, hopefully cutting down some of the girth and staying with 25k....

Posting/submitting multiple forms in jQuery

I have two forms on a page (one is being grabbed by AJAX). I need them both to be posted, so I serialize the second one and send it in a post using jQuery before submitting the first one. However, only the first form appears to be getting posted. The odd thing is though, if I put an alert after the serialized post it works as expected...

Validating Date Range Produced By jQuery UI DatePicker

I am using the date picker provided by jQuery UI to select a date range that ends up in a single text input with something like 11/11/2008 - 12/05/2008. What would you recommend as far a validation (jQuery/JavaScript) on the client side as well as code for validation on the server side (ASP.NET/C#) to make sure the user enters valid dat...

How do I hide the next/today/previous navigation in jQuery DatePicker and turn off animations?

How do I hide the prev/today/next navigation in jQuery DatePicker? I'm happy with just the Month and Year drop down boxes. Also how do I disable the animations? @tvanfosson - I already tried 'hideIfNoPrevNext' but that only works if you don't have a date range that spans two months. The duration option did the trick at turning off the...

Timeout jQuery effects

I am trying to have an element fade in, then in 5000 ms fade back out again. I know I can do something like: setTimeout(function(){ $(".notice").fadeOut() }, 5000); But that will only control the fade out, would I add the above on the callback? ...

How to get JQuery Intellisense in a .js file? (Visual Studio)

Hello, I am using JQuery extensively in my latest project. I have put my javascript content in a separate .js file, and am referencing that file in my HTML page. I get jquery intellisense support in visual studio, but I don't know how to refer the jquery file in my new javascript file so that I can get jquery intellisense there to. I am...

Intellisense support for JQuery in vs 2008 isn't working

I've followed every steps in here, but still, the Intellisense for JQuery simply isn't working, any ideas? ...

jQuery/JavaScript - performance-issue when having a lot of small .js-Files?

Hi all, i've got a site with a lot of referenced .js-Files; those are rather small files, but I want to keep my methods separated by topic/functionality. Is it better to keep all the methods in one .js-File or is it no problem to have many (~ 20 - 30) small files all including only some lines? ...

How do I add options to a DropDownList using jQuery?

As the question says, how do I add a new option to a DropDownList using jQuery? Thanks ...

How can I change HTML attribute names with jQuery?

I would like to change all the names of the attributes where class="testingCase" throughout all my whole html document. e.g. Change: <a class="testingCase" href="#" title="name of testing case">Blabla</a> <a class="testingCase" href="#" title="name of another testing case">Bloo</a> To this: <a class="testingCase" href="#" newTitleN...

jQuery Rebinding a hover event (helper).

When the page is done loading I call a function which puts the hover event on $('a.tooltip'). When I want to unbind this event I do the following: $('a.tooltip').unbind('mouseover mouseout'); That works! However when I want rebind the hover event and I call the function that was first loaded at document ready again, it doesn't ...

Jquery Rest communication with WCF 3.5

I'm testing the basics for exchanging rest messages between a asp.net mvc site and a WCF 3.5 service. The service is built using the template found in the WCF REST Starter Kit found on codeplex. I would like to exchange json messages using jquery. The REST Singleton service is working properly and it also provide examples of all the poss...

How to resize a container div to the total height of its children?

I have a container element which I need to resize as its contents change. It contains 2 absolutely positioned divs which can both change height. If I don't specify the height of the container then anything after the container disappears under the contents. At the moment I am doing the following but I'd be pleased to find a less laborio...

jQuery Cross-Browser Performance Issues

I am wrapping up a project in which I used jQuery for the first time. I loved working with the library, and thought I understood one of the benefits was cross-browser compatibility. I had an unpleasant surprise waiting for me when I began testing the site in IE6 and IE7 because in many many instances, the JavaScript (which is not terribl...

File structure for javascript-based web application

I'm planning to write a javascript-based web application. I'm wondering what the best way to implement it in terms of file stucture is. There is one main page (main.html) containing a menu and a main div section. The way it works is simple: When the user clicks on one of the links in the menu (for example 'Page 1'), the content of the d...

Moving a DOM element containing a dynamically created script tag

I'm using the Fish Gadget (http://abowman.com/google-modules/fish/) within a wiki based CMS, and need to reposition the gadget from one HTML element to another. (Note: the fish gadget is an example -- the problem occurs with other gadgets as well.) If I directly reposition the gadget using the gadgets base class "ig_reset", then everyth...

Get real image width and height with Javascript in Safari/Chrome?

I am creating a jQuery plugin. How do I get real image width and height with Javascript in Safari? Following works with Firefox 3, IE7 and Opera 9: var pic = $("img") // need to remove these in of case img-element has set width and height pic.removeAttr("width"); pic.removeAttr("height"); var pic_real_width = pic.width(); var pic_r...