PM's Blog

Pramod Mohanan's notes about ASP.NET, MVC, C#, SQL, jQuery, Bootstrap

Month – January 2012

Dynamic resizing of Images

Front end users are free to upload images of any size, However for uniformity its often necessary to resize these images to a standard width and height but still maintaining the aspect ratio. The following function is what I use to to resize an image dynamically. The file thus returned can then be renamed and […]

Simple Accordian using Jquery

The following jquery script can be used to create an accordian effect. Add the class 'handler' to the clickable element and 'expandable' to the element that needs to be toggled. <script type="text/javascript">   $(document).ready(function () {     $(".expandable").hide();     $(".handler").click(function () {       if ($(this).siblings(".expandable").css("display") == "none")       { […]
PM's Blog © 2015