Thursday, 20 March 2014

jqGrid "reloadGrid" using Local Data (JSON Object) 0

In jqGrid they are using .trigger('reloadGrid'); to reload the grid like below, $('#gridID').trigger('reloadGrid'); If you are using Local data, you should mention your Local Json Data in jqGrid's setGridParam property and you can use jqGrid's loadComplete event handler to do this like below, loadComplete: function () { jQuery("#grid1") .jqGrid('setGridParam', { datatype: 'local', data: dynaData2 //json object }) .trigger("reloadGrid"); } See this Stackoverflow...

Hide/Show A Div After A Few Seconds repeatedly 2

We can achieve using javascript's setInterval() and setTimeout() method. setInterval(function() { $("#myDiv").hide(); setTimeout(function() { $("#myDiv").show(); },1000);//hide timing },3000); //show timing Here is the DEMO...

Thursday, 13 March 2014

How to print html tags as plain text in html page using javascript 0

In this post i'm going to share how to print html tags as plain text in html page using javascript. browser read < (greater than) and > (lesser than) symbols as for html tags. So, if we use these symbols in plain text, browser will consider it as a html tags. So we need to replace < with & l t ; and >with & g t ; to print HTML tags as a Plain Text. If you feel hard to write your code with these changes, leave it. Use this below javascript function to convert html tags to...

Wednesday, 5 March 2014

simple single page layout with html and jquery 0

From this post we are going to learn how to create a single page website layout using only html and jquery. All we need is your favorite code editor and jQuery library file. We are going to use html div tags to separate the pages as sections.  Here we are using fixed header to show the section links. just separate your various page contents in various section divs and header content within header div. In css we just assign, size of the div. I mean size of the page. In header page link,...

Monday, 3 March 2014

How to change event cell color in jquery fullcalendar (arshaw fullcalendar) 1

To do this, we need to use .fc-day[data-date="Y-m-d"] In arshaw fullcalendar they used .fc-day class for date cells. they used data attributes to store date in cell. In this plugin event dates are stored in time stamp format. So, all we need is, change the timestamp formatted date into Y-m-d format and assign that date to .fc-day class element's data-date attribute. don't go anywhere to find timestamp to Y-m-d format converter code. Here I placed that code for you. You just need to enter your...