Skip to content

Instantly share code, notes, and snippets.

View manoj-singh-developer's full-sized avatar
🎯
Focusing

Manoj Singh manoj-singh-developer

🎯
Focusing
View GitHub Profile
<h4>Angular-xeditable Editable row (Bootstrap 3)</h4>
<div ng-app="app" ng-controller="Ctrl">
<table class="table table-bordered table-hover table-condensed">
<tr style="font-weight: bold">
<td style="width:35%">Name</td>
<td style="width:20%">Status</td>
<td style="width:20%">Group</td>
<td style="width:25%">Edit</td>
</tr>
<tr ng-repeat="user in users">
<div ng-app="" ng-controller="ContactController">
Email:<input type="text" ng-model="newcontact" />
<button ng-click="add()">Add</button>
<h2>Contacts</h2>
<ul>
==================================================
function ContactController($scope) {
GROUP BY ,HAVING
SELECT
YEAR(orderDate) AS year,
SUM(quantityOrdered * priceEach) AS total
FROM
orders
INNER JOIN
orderdetails USING (orderNumber)
WHERE
status = 'Shipped'
<form action="#">
<p><label><input type="checkbox" id="checkAll"/> Check all</label></p>
<fieldset>
<legend>Loads of checkboxes</legend>
<p><label><input type="checkbox" /> Option 1</label></p>
<p><label><input type="checkbox" /> Option 2</label></p>
<p><label><input type="checkbox" /> Option 3</label></p>
<p><label><input type="checkbox" /> Option 4</label></p>
</fieldset>
count href tag in a div
theDivElement.getElementsByTagName('a').length
==================================================================
Count all first list items in ul
Use the > child selector:
$('ul.menu>li').length
http://jsfiddle.net/GeJkU/
http://jsfiddle.net/fnVNc/
<script type="text/javascript">
jQuery(document).ready(function($){
$('input[name="item_meta[30]"]').change(function(){
$('select[name="item_meta[31]"], select[name="item_meta[32]"]').val('');
})
})
</script>
======================================
<script>
function showCount(count){
if(count)
document.getElementById('fb_fan_count').innerHTML = 'Total fans : ' + count[0].fan_count;
}
</script>
<p id="fb_fan_count"></p>
<script type="text/javascript" src="https://api.facebook.com/method/fql.query?format=json&callback=showCount&query=select+fan_count+from+page+where+page_id%3D80177638103"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/front/js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/front/js/knockout-3.4.0.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/front/js/moment.js"></script>
<br>
<br>
<br><br>
<br>
<br>
<br>
<br>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.angularjs.org/1.2.0-rc.2/angularjs.js"></script>
<script>
function mainController($scope)
{
$scope.data =
{
http://quickblox.github.io/quickblox-javascript-sdk/samples/chat/#