Contents tagged with jQuery
-
Error 400 with WCF REST Services
I recently worked on a site that had a strange issue where “sometimes” the WCF service (JSON encoding) that we accessed via JavaScript (using jQuery) was throwing an HTTP 400 error. Setting a breakpoint at the web method itself was useless as it would never be hit.
-
Server Controls vs Plugins
-
Getting comfortable with Javascript callbacks
It seems every language has it’s own way of implementing callbacks.
-
jQuery Code Snippets for Visual Studio 2010
These are just genius. I especially like the one for adding an AJAX call to an asmx, which is always a pain.
-
jQuery Masonry – the answer to vertical flow layout
“Masonry is a layout plugin for jQuery. Think of it as the flip side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically then horizontally according to a grid. The result minimizes vertical gaps between elements of varying height, just like a mason fitting stones in a wall.”
-
The jTemplates plugin for jQuery – Keep inline templates from being misinterpreted
I love the jTemplates plugin for jQuery. It works great and I’ve had very little trouble working with it when I put my templates in separate files. This ensures that the browser does re-interpret the html for the template and re-arrange the elements. This happens mostly with tables in IE and Webkit browsers where you want to repeat the rows of the table. You’ll see what I mean in a moment.
-
How JSONP works
There are a plethora of explanations for JSONP (JSON with Padding, I think it stands for) out there – just search for “how JSONP works” and you’ll get a ton of descriptions. JSONP is provided as an alternative to normal JSON by jQuery on the client side to enable the invocation of services outside of the current domain.
-
Load jQuery Dynamically
Sometimes you have to load jQuery, but you don’t know if it has already been referenced somewhere else in the website.
-
JQuery - get a handle on a server element in javascript without using <%= elem.ClientID %>
One of the things I see a lot of is code that looks like this:
-
VS Docs for jQuery 1.3.1
I am using jQuery for everything these days - it really is an awesome add-on to any web application, and what even better is that you can get intellisense on it for the latest version.