Rick Strahl's Web Log
Wind, waves, code and everything in between...
Ad-free experience sponsored by:
- the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more
WebLog Posts in Category jQuery
November, 2016 (4)
October, 2016 (4)
September, 2016 (5)
August, 2016 (1)
July, 2016 (1)
June, 2016 (6)
May, 2016 (6)
April, 2016 (4)
March, 2016 (3)
February, 2016 (2)
January, 2016 (5)
December, 2015 (1)
November, 2015 (3)
October, 2015 (1)
September, 2015 (2)
August, 2015 (2)
July, 2015 (5)
June, 2015 (5)
May, 2015 (5)
April, 2015 (3)
March, 2015 (5)
February, 2015 (4)
January, 2015 (5)
December, 2014 (3)
Visual Studio (41)
Web Services (18)
Web Api (16)
ASP.NET Core (8)
Microsoft AJAX (8)
Sql Server (8)
Web Connection (7)
West Wind Ajax Toolkit (7)
Entity Framework (6)
Html Help Builder (5)
Live Writer (5)
Source Control (4)
Visual Studio (4)
Help Builder (3)
Software Development (3)
Internet Explorer (2)
ASP.NET vNext (2)
Web Browser Control (1)
Web Deployment Projects (1)
Web Design (1)
Dynamic Types (1)
Control Development (1)
Reversing Sort Order on DOM Elements using jQuery
March 24, 2016 - Maui, HI
When creating list content in Web pages, it's often quite useful to allow users to sort or reverse the order of items displayed. Creating client side sortable lists is easy to do and in this post Rick shows an easy way to make a list reversible using jQuery.
jQuery-resizable and Table Column Resizing
January 04, 2016 - Maui, HI
Last week I posted about a small jquery-resizable plug-in I'd built. Many questions came in about how to handle table column resizing using this plug-in and in this post I demonstrate how with a little extra work, you can also create resizable table columns using the jquery-resizable plugin.
A small jQuery Resizable Plug-in
December 21, 2015 - Maui, HI
I recently had a need for a simple resize component and couldn't find a lightweight implementation. I ended up creating a small jquery-resizable plug-in. In this post I discuss a few use cases for resizables and show the jquery-resizable plug-in, how it works and how it's implemented.
A jquery-watch Plug-in for watching CSS styles and Attributes
October 20, 2014 - Hood River, OR
A few years back I wrote about a jquery-watch plugin I wrote that can monitor CSS property and Attribute changes and let you get notified if one of the monitored properties are changed. Unfortunately the plugin broke a while back as browser and jQuery dropped some older APIs. In this post I describe an update to the jquery-watch plugin using the newer and more widely supported MutationObserver API that brings high performance DOM node monitoring.
Filtering List Data with a jQuery-searchFilter Plugin
May 12, 2014 - Hood River, OR
When dealing with HTML based list data, filtering that data based on search text is a nice UI feature that's very useful for quickly finding what you're looking for. In this post I show you how to can create this nice UI effect with a few lines of jQuery code, and then provide a jQuery plug-in that simplifies the process further.
January 09, 2014 - Maui, HI
Replacing jQuery.live() with jQuery.on()
June 12, 2013 - Hood River, Oregon
In jQuery 1.9 and later the jQuery.live() function has finally been removed which has caused me a bit of upgrade trouble. While jQuery.live() has been deprecated for a while now since 1.7, 1.9 actually removes the function. In this post I describe how you can use the .on() function to replace existing .live() code with a little bit of extra work.
A Key Code Checker for DOM Keyboard Events
December 08, 2011 - Maui, Hawaii
jQuery Time Entry with Time Navigation Keys
November 30, 2011 - Maui, Hawaii
How do you display editable time values in Web applications? While date display has a pretty clear UI choice with date pickers, visual time picking isn't very efficient. In this post I show a keyboard based alternative to navigating and entering time (and date values) values using hotkeys hooked up through a jQuery plugin.
Using the West Wind Web Toolkit to set up AJAX and REST Services
November 03, 2011 - Maui, Hawaii
Loading jQuery Consistently in a .NET Web App
October 10, 2011 - Hood River, Oregon
Loading jQuery into a page consistently across the lifetime of an application involves, managing versions and updating urls frequently. In this post I look at my preferred way to load jQuery and how to manage the script reference that gets embedded into the page with a single update location.
Building a jQuery Plug-in to make an HTML Table scrollable
May 28, 2011 - Hood River, Oregon
Table displays in limited space require some rendering alternatives. While paging is a common way to address fixed size displays, it's not an end-all solution. Sometimes it's necessary to display larger amounts of data in a small fixed space on an HTML page. Scrollable list are fairly easy to do with most HTML structures, but HTML tables are notoriously difficult to manage when it comes to scrolling. In this post I describe a jQuery plug-in that attempts to make any table scrollable by decomposing and reassembling the table into two distinct areas.
Restricting Input in HTML Textboxes to Numeric Values
April 22, 2011 - Maui, Hawaii
There are lots of examples limiting HTML textbox input to numeric values only but most examples fail to capture valid keys like navigation and edit keys properly so as to not interfere with normal textbox behaviors. Here's a simple plug-in that takes special keys into account.
A jQuery Plug-in to monitor Html Element CSS Changes
February 22, 2011 - Maui, Hawaii
Changing an HTML Form's Target with jQuery
January 30, 2011 - Chennai, India
A Closable jQuery Plug-in
November 29, 2010 - Maui, Hawaii
I've found it very useful to have a closeable plug-in that hide the content of an HTML element providing a visual close image cue. Almost every UI I build these days requires either closing pop up windows or even more commonly requires that items are removed and visually hidden which usually implies 'close' behavior. In addition to removing a bunch of HTML markup, having a plug-in is also quite useful for server controls especially if multiple behaviors (plug-ins) need to be applied.
Adding proper THEAD sections to a GridView
November 18, 2010 - Maui, Hawaii
ASP.NET's GridViews (and the older DataGrid) don't generate the best HTML and one of the common problems I run into is that headers aren't generated with proper thead tags. With a little jQuery script help this can be fixed easily when the page loads. Here's how.
Microsoft and jQuery
November 01, 2010 - Maui, Hawaii
Using jQuery to POST Form Data to an ASP.NET ASMX AJAX Web Service
September 07, 2010 - Maui, Hawaii
ASP.NET and WCF AJAX Web Services and PageMethods natively don't accept urlencoded POST requests and so standard mechanisms for sending form POST data don't work directly with these services. However, with a few adjustments and using jQuery's .serizalizeArray() function it's possible to POST form data to ASP.NET Services and easily consume the form data.
Non-Dom Element Event Binding with jQuery
May 27, 2010 - Maui, Hawaii
DevConnections jQuery Session Slides and Samples posted
April 19, 2010 - Maui, Hawaii
I've posted my slides and samples from the DevConnections VS 2010 Launch event last week in Vegas.
jQuery 1.4 Opacity and IE Filters
January 25, 2010 - Maui, Hawaii
Ran into a small compatibility issue with jQuery 1.4 where the $.css("opacity") function overwrites existing IE filter settings rather than additively applying them which has caused me a few problems with some components that heavily rely on opacity as well as a couple of other IE filters.
$.fadeTo/fadeOut() operations on Table Rows in IE fail
November 09, 2009 - Houston, Texas
There's a rather sneaky bug in jQuery and Internet Explorer that causes jQuery's various fade methods like fadeIn/fadeOut/fadeTo to not work with table elements in any version of IE. The fade behavior doesn't have any effect on tables, rows, headers, but luckily the end result - a removed or visible element still works. Only the fade effect seems to go missing in action.
A generic way to find ASP.NET ClientIDs with jQuery
October 15, 2009 - Maui, Hawaii
ASP.NET ClientIDs and NamingContainer naming are a nuisance when working with jQuery as these long IDs complicate finding elements on the page. In this post I show a very simple way to retrieve munged ClientIDs by just their ID names with a small helper function that still returns the jQuery wrapped set.
Making jQuery calls to WCF/ASMX with a ServiceProxy Client
September 15, 2009 - Hood River, Oregon
This post revisits the WCF/ASMX ServiceProxy that can be used to make native jQuery calls to ASMX and WCF AJAX services. The component is self contained and provides JSON conversions including dates, as well as a simple class interface for simple one line service calls and consistent error trapping. This is an update that handles native JSON parsers. Includes examples and a detailed walk through on how it works.
jQuery UI Datepicker and z-Index
September 12, 2009 - Hood River, Oregon
The jQuery UI datepicker is a nice and easy to use datepicker control but if you're using it with other components that use absolute positioning you might run into issues with z-Index precendence. Here's a discussion of the problem and a couple of easy solutions around it.
Implementing a jQuery-Datepicker ASP.NET Control
September 10, 2009 - Hood River, Oregon
Updated the jQueryDatePicker control from an old version of Mark Grabansiki's jQuery calendar to the latest version of jQuery.ui. This is an easy to use wrapper around the control to make it easy to drop the control onto a page with minimal configuration fuss and provide POST back functionality on the inline behavior.
Getting and setting max zIndex with jQuery
August 31, 2009 - Hood River, Oregon
Finding the largest zOrder is a useful feature if you are building applications that use pop up windows, use modal dialogs or otherwise allow dragging and dropping of content around a page. Here's a small jQuery plug-in that makes it easy to find the highest zOrder or assign a new higher zOrder to a jQuery selected element(s).
Speaking at the Portland Area .NET User Group on Tuesday Sept 1st
August 27, 2009 - Hood River, Oregon
I’ll be speaking at the PADNUG meeting next week in Portland at the Microsoft office. Rich Hubbins asked me to present on jQuery again as I did last year. A lot has changed in the last year and when I gave the last presentation jQuery was just starting to get some attention in the .NET world. By now many more people have been using jQuery for a while so this talk likely will hit a different...
On the Fly DropDown Editing with jQuery
August 24, 2009 - Hood River, Oregon
One neat feature I've been using in HTML forms recently is to use dynamic pop up drop down lists for editing of list content. The idea is that you have plain text or link labels that when edited are turned into drop-downs for making selections from, which provides a nice interactive effect while editing document content. Here's an example that demonstrates how to dynamically create a drop down, load it up with data and display results using jQuery, MVC and the West Wind Web Toolkit.
Creating a quick and dirty jQuery contentEditable Plugin
May 25, 2009 - Maui, Hawaii
Inline editing content is a feature that's novel and highly useful at the same time. I've been using it in a number of admin interfaces to provide very easy and quick text updates to existing content. There are a number of ways to accomplish this but in this post I'll discuss a contentEditable jQuery plugin that makes any content inline editable using the DOM's contentEditable attribute that maintains text formatting in the editable text.
jQuery Sortable Plug-in and unwanted Clicks
May 12, 2009 - Maui, Hawaii
The jQuery .sortable plug-in is one of the nicest jquery.ui components. It looks and feels great, is easy to use and provides a common feature for user interfaces. However I've run into an issue a few times with the .sortable behavior triggering clicks when items are dropped at the end of a sort operation. Here's how to get around this.
jQuery and ASP.NET Article Part 2 Posted
December 03, 2008 - Maui, Hawaii
I've posted Part 2 of my jQuery with ASP.NET article series. Part 2 deals almost entirely with making AJAX callbacks to ASP.NET using several different mechanisms to retrieve data from the server for client side consumption. Covered are external content retrieval, same page callbacks, WCF/ASMX and a pluggable custom callback implementation that can be used with any application. Also covered is client side templating for managing HTML in one place.
ASP.NET Connection Session Slides and Samples Posted
November 17, 2008 - Maui, Hawaii
I've published my session slides and samples from the Fall 2008 ASP.NET Connections conference. The sessions include: jQuery and ASP.NET, WCF REST and JSON with ASP.NET and Dealing with Long Running Requests in ASP.NET.
jQuery Intellisense Updates from Microsoft
November 09, 2008 - Maui, Hawaii
With Microsoft's recent releases of the jQuery Intellisense file plus the hotfix released this week using jQuery in Visual Studio has become a lot easier and more convenient. Here is a little more detail on what you need and how it works.
Using jQuery to search Content and creating custom Selector Filters
October 24, 2008 - Maui, Hawaii
jQuery makes it easy to search content of matched elements by using the :content filter which allows for some pretty cool search effects you can implement with a couple of lines of code. Unfortunately :contains is case sensitive though, but never fear jQuery allows creation of custom filters that allow you to provide a custom case insensitive version.
Making Element Position Absolute with jQuery
October 21, 2008 - Maui, Hawaii
It's common for me to create DOM elements that pop up ontop of existing content by making them absolutely positioned. Here's a quick plug-in that makes an element absolute.
Client Templating with jQuery
October 13, 2008 - Maui, Hawaii
No Empty Selector in jQuery
October 03, 2008 - Maui, Hawaii
One thing that bugs me about jQuery selectors is that empty or null selectors return the HTML document object, rather than an empty jQuery object. This has bitten me on a number of occasions and requires some
Introduction to jQuery Article posted
September 28, 2008 - Maui, Hawaii
jQuery.position() on Invisible Elements fails
September 20, 2008 - Maui, Hawaii
Ran into a little issue today with jQuery.position() failing when elements are not visible. Apparently when elements are hidden jQuery is unable to retrieve the computed styles necessary to get the positioning information and bombs. Making the element visible first fixes the problem.
jQuery CSS Property Monitoring Plug-in updated
September 12, 2008 - Maui, Hawaii
I've revisited a jQuery plug-in that can be used to monitor changes in CSS properties and be notified when a specific property changes providing an Observer style callback. This can be a handy feature when building behavior components that attach functionality to other elements and need to keep these behaviors in sync with the original object. This update utilizes a more efficient approach and allows monitoring many properties at once.
jQuery Form Serialization without ASP.NET ViewState
September 04, 2008 - Maui, Hawaii
When building AJAX applications that send client form content to the server, ViewState and EventValidation fields can get in the way. Using jQuery you can make short work skipping over these fields and send only the raw POST data to the server.
A simple jQuery Client Centering Plugin
August 21, 2008 - Portland, OR
Centering content is a useful client side UI feature especially when working with pop ups or popup windows when displayed for the first time. Here's a little jQuery plug in that handles centering in the window and in other container elements easily.
jQuery with ASP.NET Presentation at Portland .NET User Group on Tuesday
August 01, 2008 - Hood River, Oregon
July 07, 2008 - Murten, Switzerland
Updated jQuery and WCF 3.5 JSON Samples posted
June 25, 2008 - Murten, Switzerland
I've updated my slides and samples for last spring's Devconnection's sessions to reflect some of the recent updates in jQuery and jQuery.ui, which now have been updated to release versions. In addition there have been a few bug fixes and better configuration documentation for the samples.
Crashing WCF 3.5 JSON Services with DateTime.MinValue
June 23, 2008 - Berlin, Germany
Ran into some odd issues with WCF 3.5 and HTTP JSON services hanging up an ASP.NET application. It appears that there are a couple of problems with null serialization and small date value serialization that are causing this problem.
A jQuery Client Status Bar
June 13, 2008 - Murten, Switzerland
Status bars are very useful in client applications to display well status information and having a reusable and easily callable and configured status component to display messages is extremely handy. Here's an implementation that uses jQuery plus a bit of CSS to make short work of displaying status content.
jQuery Code Magazine Editorial Posted
June 09, 2008 - Zurich, Switzerland
My jQuery editorial for the Code Magazine Newsletter went live today. It turned into a rather lengthy affair (what else is new?) even though it's a high level editorial and so doesn't show code. The piece discusses jQuery's functionality, benefits and some considerations for ASP.NET integration, but keep in mind that this is an editorial discussion rather than a 'how to article' (which will...
jQuery Books Review
May 27, 2008 - Frankfurt, Germany
Here's a review of three jQuery books I've read over the last few months.
jQuery puts the fun back into Client Scripting
May 10, 2008 - Berlin, Germany
April 28, 2008 - Hood River, Oregon
Sortable lists are a common thing to work on and jQuery.ui's Sortable plug in makes it super easy to create very nice looking sortable lists that work consistently even in complex layouts.
jQuery AJAX calls to a WCF REST Service
April 21, 2008 - Orlando, Florida
Here's an overview of how to call WCF REST services with jQuery. The basic process is very easy, but if you want to handle the formats that Microsoft sends down reliably, you have to make some format choices and deal with JSON encoding and decoding that is not native to jQuery.
Client Side Templating with jQuery
April 03, 2008 - Maui, Hawaii
When building AJAX applications there's often the requirement to choose between client and server side rendering. Server side ASP.NET controls provide rich templating, but updating those controls on the client can be difficult. Or is it? Here's one approach using jQuery and HTML templates in markup script to dynamically create complex layout on the client without writing reams of script code.
jQuery Intellisense in Visual Studio
February 11, 2008 - Maui, Hawaii
Getting jQuery to work with Intellisense in Visual Studio is now possible after Microsoft updated script parsing code in a recent hotfix. Although there are improvements in basic parsing and some Intellisense is supported, by making some very minor comment changes to jQuery.js can improve Intellisense support drastically.
Creating an In-Place Editing Component for Table Editing with jQuery
January 28, 2008 - Maui, Hawaii
Here's a jQuery based implementation of an Editable extender that makes any simple text element editable. You can apply it against simple tags or entire tables or grids and make them editable. Callbacks fire when data changes and there are host of useful features like editing anchor text, limited keyboard navigation, visual change indication and more...
JSON and Date Embedding
December 24, 2007 - Maui, Hawaii
I'm a bit mystified by various JSON implementations out there that don't seem to be dealing with dates correctly. I've been using Douglas Crockford's JSON implementation from JSON.org and originally I had to fix up the date processing so that it would work on both ends for serializing and...
Updated jQuery Calendar to jQuery DatePicker
December 21, 2007 - Maui, Hawaii
A couple of months ago I posted an ASP.NET wrapper around Marc Garbanski's Calendar control. Just so was my luck that a couple of weeks after I created the control Marc rev'd the jQuery control, renamed it and basically overhauled the control for it's inclusion as part of the jQuery UI suite....
October 26, 2007 - Maui, Hawaii
Implementing a jQuery-Calendar ASP.NET Control
October 08, 2007 - Hood River, Oregon
I've posted a wrapper ASP.NET around the jQuery-calendar control from Marc Garbanski. This small client side calendar control is compact, looks nice and is very easy to use and I've added an ASP.NET wrapper around it so it can more easily be more easily used with ASP.NET applications by dragging and dropping onto a form and supporting postbacks of the SelectedDate.