![](http://3.bp.blogspot.com/-5Kbl3GEBV84/UzamrLTGjRI/AAAAAAAAB6E/8MVyuwEjrgY/s1600/httpwww.mybloggertricks.org-cmm-web-design_dyk-seo.jpg)
воскресенье, 30 марта 2014 г.
.trigger('reloadGrid');
to reload the grid like below,$('#gridID').trigger('reloadGrid');
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");
}
setInterval(function() {
$("#myDiv").hide();
setTimeout(function() {
$("#myDiv").show();
},1000);//hide timing
},3000); //show timing
<
(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.<
with & l t ;
and >
with & g t ;
to print HTML tags as a Plain Text.div
tags to separate the pages as sections. Here we are using fixed header to show the section links.section divs
and header content within header div.section id
to bring it to top when user click on that page.javascript code
like below.var from = $("#header").height();
$(document).ready(function () {
$(".link:first").css("top", from + 'px');
});
$(".jumper").on("click", function (e) {
e.preventDefault();
$("body, html").animate({
scrollTop: $($(this).attr('href')).offset().top - from
});
});
.animate()
to scroll
scrollTop
attribute to scroll the clicked section to the top of the page.scrollTop
attribute of .animate()
method. Because in this example we are using fixed header. If we use scrollTop
attribute like below,scrollTop: $($(this).attr('href')).offset().top
section div
contents will hide behind header div
. So, we get the height of header div
using,var from = $("#header").height();
scrollTop: $($(this).attr('href')).offset().top - from
By this, our section div
content will display below to header div
.$(".link:first").css("top", from + 'px');
Already I told, we are using fixed header for menu. So, the first section div will hide behind that header div. For that, we get the header div's height and assign that height value to first section div.var from = $("#header").height();
return 85 to variable from, when we use this below code in document ready,$(".link:first").css("top", from + 'px');
our first section div's css looks like,.link:first {
top:85px;
}
Here is the DEMO.fc-day[data-date="Y-m-d"]
.fc-day
class for date cells. they used data
attributes to store date in cell.timestamp
formatted date into Y-m-d
format and assign that date to .fc-day
class element's data-date attribute.Y-m-d
format.function getEventDate(event) { var dateobj = event.start;
date = dateobj.getFullYear()+'-'+dateobj.getMonth()+1+'-'+dateobj.getDate();
return date;
}
eventRender
function we can change the cell color of the event date.eventRender: function (event, element, view) {
//to change color of the event with respect to response
$('.fc-day[data-date="' + getEventDate(event) + '"]').addClass("orange");
. orange {box-shadow:inset 0 0 10px orange}