Skip to content

Instantly share code, notes, and snippets.

@steelheaddigital
steelheaddigital / ExampleUsage
Created July 30, 2012 23:01
An extension of the ASP.NET MVC WebGrid HTML helper to add a total row
In the ViewModel or Controller, create a new TotalWebGrid and return it to the view, just like with the normal WebGrid.
public TotalWebGrid Grid
{
get
{
return new TotalWebGrid(
source: stagingBillLines,
rowsPerPage: 10,
ajaxUpdateContainerId: "BillLines");
@drewjoh
drewjoh / custom.js
Created January 27, 2012 13:55
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {
@rpheath
rpheath / jquery.infinitescroll.js
Created November 2, 2010 01:48
A jQuery plugin for bi-directional infinite scrolling
// A bi-directional infinite scrolling jQuery plugin
//
// Usage Example:
// $(window).infiniteScroll({ url: window.location.href })
(function($) {
$.scroller = {
// default settings
settings: {
url: null,