jQuery: datepicker alternative

Is there a better, smaller alternative to the jQuery datepicker? The ui.datepicker.js has app. 70kb which is pretty huge imo. Could it be compressed? Answer The best alternative I know is Kelvin luck’s datepicker. AttributionSource : Link , Question Author : Fuxi , Answer Author : Soufiane Hassou

Complex JavaScript. What called me?

Project I’m working on uses jQuery. I have a series of Ajax calls being made that load() other HTML fragments which in turn load() other fragments. The whole thing is confusing. I didn’t write the code. Is there any tool which will allow me to walk the callstack so I can figure what is calling … Read more

How does the “this” syntax work?

Is this line $(this).attr(“id”).replace(“_button”,””); equivalent to this one? this.attr(“id”).replace(“_button”,””); Answer since this always contains a reference to the object of invocation, it really depends where you call that code. If you call this within a jQuery event handler, this is a reference to the DOM element itself, so you need to translate it into a … Read more

jQuery working out wrong height, due to @font-face

I have a problem with jQuery and @font-face. I need to work out the height of a <div>, which works fine, but then there is a small delay for the fonts to load and as soon as they do, the @font-face fonts were actually bigger than the fallback fonts, so the height is smaller than … Read more

jQuery: array of elements to raw html?

Let’s say I have an array like this: var content = [ $(‘<p>…</p>’), $(‘<p>…</p>’) ]; I need to get the markup of the concatenated elements. So I need to convert content” into a raw string: “<p>…</p><p>…</p>“. How can this easily be done? Seems like there should already be something in the framework to do this. … Read more

What are the side effects (if any) of multiple $(document).ready() in an HTML page?

I am using a web application framework (Symfony 1.3.6), which follows the MVC pattern. The view layer is comprised of a template decorator. The template file may also include other templates – this is what gives rise to my question. Assuming that there is a page (lets call it the ‘homepage’), which is comprised of … Read more

JQuery’s getJSON() not setting Accept header correctly?

It looks like people have had issues with Accept headers in the past, but I’m not sure my issue is related. Using jQuery 1.4.2, I’m having trouble getting JSON with getJSON(). I can watch the request / response in Firebug and it looks like the source of the problem is that the resource in question … Read more