- send HTTP request: guzzle, php-curl-class (still comparing them)
- slim (RESTful framework)
- yii, symfony, cakephp (framework)
- briannesbitt/Carbon (datetime lib)
- laravel
ab -c 200 -n 2000 |
$(function() { // wait for the DOM to be ready | |
$('#foo').submit(function() { // bind function to submit event of form | |
$.ajax({ | |
type: $(this).attr('method'), // get type of request from 'method' | |
url: $(this).attr('action'), // get url of request from 'action' | |
data: $(this).serialize(), // serialize the form's data | |
success: function(response) { | |
// if everything goes well, update the div with the response | |
$('#result').html(response); | |
} |
$(window).scroll(function(){ | |
// maybe include - $('#footer').outerHeight(true) <-- height with margin | |
if ($(window).scrollTop() >= $(document).height() - $(window).height()) { | |
// do something, load more products, etc | |
} | |
}); |
header('Content-Type: application/json'); |
<script type="text/javascript"> | |
var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>"; | |
</script> |
To get object ionicModal:
var template='<ion-modal-view>
<ion-header-bar><h1 class="title">title</h1></ion-header-bar>
<ion-content>content</ion-content>
</ion-modal-view>';
$scope.modal = $ionicModal.fromTemplate('templates/code-modal.html', {
scope: $scope,
<input type="text" ng-model="contact.name">
<div>
{{contact.name}}
</div>