An explanation of how to use Dependency Injection in Web API in MVC 4.
Read this postAn explanation of how to use Dependency Injection in Web API in MVC 4.
Read this postChosen is a javascript plugin that makes select boxes more user friendly.
The zindex stacking context issue means it doesnt work out of the box in IE7.
The Javascript below resets zindexes so chosen dropdown displays correctly
1 2 3 4 5 6 7 |
if ($.browser.msie) { var zIndexNumber = 1000; $('div').each(function () { $(this).css('zIndex', zIndexNumber); zIndexNumber -= 10; }); } |
Autofocus=”autofocus” attribute specifies that any input (or button in HTML5) should automatically get focus when the page loads – it obviously doesn’t work in some (all?) versions of IE.
Javascript fix (needs jquery and Modernizr)
1 2 3 4 5 |
$(function () { if(!Modernizr.input.autofocus) { $("[autofocus]:first").focus(); } }); |
Or in coffeescript,
1 |
$ -> if not Modernizr.input.autofocus then $("[autofocus]:first").focus() |
Why did nobody tell me ?
And why isnt this switched on by default ? Would catch and prevent 92.567% of all MVC runtime exceptions.
My take on best practices for organizing javascript files in MVC.
Read this postHow to configure your projects to use PostSharp with mixed mode assemblies.
Read this postIn honor of the late Steve Jobs,
“Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.”
A globalization fix for JQuery validate and date checking
Read this post