Month: May 2012

Combining Multiple attributes in jQuery
Below are some of the code snippets available in jQuery for you to combine your multiple lines of code: Combining multiple css properties or element attributes: Statement: Set the width and height attributes for a table with id=mytable $("#mytable").attr({width:'50px',height:'40px'}); Statement: Set the css properties of width, height, background-color for a div with id=mydiv $("#mydiv").css({width:'50px',height:'40px',background-color:'#F2F2F2'}); Combining ...

SharePoint Client Object Model (ECMAScript) #2 – Update Web Properties
SharePoint Client Object Model (ECMAScript) provides the capabilities of SharePoint Server Object capabilities at the client side. In this tutorial, let me show you how you can play around with the Client Object Model through IE Developer Toolbar how to update Web properties. Check the screenshot below, to know what we are trying to achieve ...

SharePoint Client Object Model (ECMAScript) #1 – Get Context Object
SharePoint Client Object Model (ECMAScript) provides the capabilities of SharePoint Server Object capabilities at the client side. In this tutorial, let me show you how you can play around with the Client Object Model through IE Developer Toolbar. Check the screenshot below, to know what we are trying to achieve here: Below is the function ...

Best Practices for jQuery Developers
Following are some of the best practices that you could follow while working with jQuery: Plugins: Please avoid unnecessary use of plugins If a plugin is being used, respect the authors work and ensure that the plugin file is reused with the license comments intact If you are writing a reusable functionality in the code, ...

Convert a JSON string into a C# object
There could be scenarios in our project wherein we consume a service which returns back a JSON message. These JSON message is infact a stringified version of an object and are recognized as a simple string format by our server side. Decoding them gets difficult at the first shot. But C# itself has got a ...