Category: jQuery

Convert a Sitecore WFFM Form to Wizard Form (Js based Approach)
While working with Sitecore, I am sure you must have found WFFM (Web Forms For Marketers) been very useful be it a developer/marketer. However, there had been one thing that i always missed in the form - a Wizard interface especially when it comes to lengthy forms. Before i jump into the solution, here are ...

Sitecore & Postman: A Quick Starter Guide
Working RESTful API for Sitecore ItemServices gets easier with Postman. Prerequisites Download the latest version of Postman from here. I highly recommend Signing up to keep your Collections in sync. Enable SSL on the CMS environment. You can create a self signed certificate on the CMS environment and add an HTTPS binding Update Policy Setting ...

Having multiple JSLink based webparts on the same page, overrides all the other templates in SP 2013
Scenario: Create a dashboard page in SP 2013, displaying just 3 lists in 3 different views using Js Link capability. The 3 lists are: Accordion: A list containing title and description which will be displayed on the dashboard with an accordion functionality with title being the accordion item heading and description being the accordion item body. Menu: ...

JSLink SharePoint 2013 troubleshooting
JsLink is a good feature that was introduced in SP 2013 to allow users to bring in more flexibility in Client Side Rendering (CSR). With this you can control how your list data is getting displayed in View, Display, Edit and New forms. For ex., you can achieve this using JSLink: You can check ...

Basics of javascript Templating
Being the 100th post, i felt i should share some of my most useful learning here. And i could not think of anything better than javascript Templating. There are quite a handful of such templating tools available online(JsRender, Underscore.js, Moustache.js...). Feel free to run a jsPerf on the tool you wish to use and then ...

Detect multiple key press in javascript for your website
Many a times we end up in situations where in our clients are windows app migrants to web. And they could not let go off the "hotkey" concept. Let's say "Ctrl + S" or "Alt + R" to perform save or submit operation on a website. The options are endless. A scalable code that you ...

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 ...

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, ...

Generate JSON string output in C#
This is one of the most widely used and very useful script that you could use in your web services/ WCF services/ Handlers or any place wherein you require a JSON string to be passed to the client/ consumer. We make use of the Serialize method in JavaScriptSerializer class in C# under the following namespace: ...

Selecting a complex jQuery selector present in a page
Most of time, the moment we see a complex ID like 'ctl00_m_g_f368f5ab_d679_4436_a6da_938c6bfcd60a_ctl00_SearchCheckBox' we faint... 😉 And what we end up is start finding some parent which has an ID or see if there is a css class defined for this control. Targeting a control using its parent is good and performance-wise effective. However, using a ...