Friday, June 24, 2016
Sorting on JSON
Hi ,
JSON is the handy object for JS.
To sort in JSN
var nItems = {
nid: item.ParentLink,
nName: item.Title,
cid: item.Id,
URL: item.URL,
DO: item.DisplyOrder
}
var deskItem = $.trim(item.Title).toUpperCase();
ParentNodes.push(nItems);
ParentNodes.sort(function(a, b){
return a.DO - b.DO;
});
Tuesday, May 31, 2016
Align horizontal radio buttons for choice field in sharepoint
Hi ,
We all are struggling to make sharepoint choice fields as horizontal alignment. After digging the code below is the solution.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function HorizontalAlignChoices()
{
var objSpans=$(".ms-RadioText");
objSpans.each(function(){
$(this).closest("tr").css({"float":"left"});
});
}
$(document).ready(function() {
alignOptions("choiceAlign");
alignOptions("testAlign");
});
</script>
Subscribe to:
Posts (Atom)