Tags » JQuery

Headless Drupal 8 - Retrieving Content Using Backbone.js

In this post I’ll explain how to decouple Drupal front-end to use your own implementation using Backbone.js and Drupal 8 as a RESTful API to retrieve the content. 1,517 more words

Blog

How to parse xml using jquery

Index.html:

<html>

<head>
	
</head>
<body>
<div id="content"></div>
 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> 
<script type="text/javascript">
$(document).ready(function(){
 
 
function parse(document){
  $(document).find("book").each(function(){
    $("#content").append(
	'<p>ID: '+$(this).attr('id')+
	'<br /> Title: '+$(this).find('title').text()+
	'<br /> Author: '+$(this).find('author').text()+
	'</p>'
	);
  });
}
 
 
 
  $.ajax({
    url: 'read.xml', // name of file you want to parse
    dataType: "xml",
    success: parse,
	error: function(){alert("Error: Something went wrong");}
  });
});
</script>
</body>
</html>

… 99 more words
Jquery

Enable SharePoint 2013 Search REST Queries for Anonymous

Recently in my project, I have to enable / call SharePoint REST Search Queries for Anonymous users. The reason behind that is because the site is public external site and I would like the search box to… 1,401 more words

SharePoint

100% min-height div with jQuery

The following jQuery script would apply the minimum height of 100% to any div and will refresh this value when the window is re-sized.

This script will have no effect if the content of the div is larger than 100% widow height. 94 more words

Tech

Check/Uncheck all Items in an ASP.NET CheckBox List using jQuery

<script type=”text/javascript”>
$(document).ready(function () {
$(‘#ctl00_ContentMain_chkAll’).click(
function () {
$(“INPUT“).attr(‘checked’, $(‘#ctl00_ContentMain_chkAll’).is(‘:checked’));
});
});

</script>

<div class=”col1″>
<div class=”rating_con_flight”>
<asp:CheckBox ID=”chkAll” runat=”server” CssClass=”bkStatuscls” />
<div class=”numaric”>All </div> 94 more words

JavaScript

clone

The clone() method makes a copy of selected elements, including child nodes,text and attributes

Clone