Use jQuery to check mousewheel event without scrollbar

I highly recommend you use this jQuery plugin: PLUGIN Without a plugin, try this example: EXAMPLE HTML: <div id=’foo’ style=”height:300px; width:300px; background-color:red”></div> Javascript: $(‘#foo’).bind(‘mousewheel’, function(e) { if(e.originalEvent.wheelDelta / 120 > 0) { alert(‘up’); } else { alert(‘down’); } }); There is no scrollbar on the div but the wheel event is detected.

How do I programmatically scroll a winforms datagridview control?

Well, since this is a datagridview… Sorry for the ‘winforms’ in the question… but I could just do this.. scrolling up or down one row. Scroll up: this.FirstDisplayedScrollingRowIndex = this.FirstDisplayedScrollingRowIndex – 1 Scroll Down: this.FirstDisplayedScrollingRowIndex = this.FirstDisplayedScrollingRowIndex + 1; You’ve gotta make sure to check that the numbers don’t go out of bounds though.

How lazy loading images using JavaScript works?

Here’s a how-to, using plugins: http://www.webresourcesdepot.com/lazy-loading-of-images-resources-you-need/ here’s the jquery plugin: http://www.appelsiini.net/projects/lazyload basically you put a dummy image in your src attribute and add another attribute for the actual image, JS detects the scroll position of the page, and loads the image data once you get close enough to the image. it does that by replacing … Read more

mvvm how to make a list view auto scroll to a new Item in a list view

This solution is for a ListBox, but it could be modified for a ListView… This will scroll the selected item into view when you change the selected item from the ViewModel. Class: /// <summary> /// ListBoxItem Behavior class /// </summary> public static class ListBoxItemBehavior { #region IsBroughtIntoViewWhenSelected /// <summary> /// Gets the IsBroughtIntoViewWhenSelected value /// … Read more