Response title
This is preview!
$.fn.ajaxify = function(){...
They then dump it normally into the selector.// HTML Helpervar documentHtml = function(html){// Preparevar result = String(html).replace(/<\!DOCTYPE[^>]*>/i, '').replace(/<(html|head|body|title|meta|script)([\s\>])/gi,'<div class="document-$1"$2').replace(/<\/(html|head|body|title|meta|script)\>/gi,'</div>');// Returnreturn result;};
I'd say do both, accept a callback and bind to the event with that callback, while allowing the developer to manually bind to it himself if he/she wants.- Should I trigger an event on completion, instead of a callback, like Balupton does?
- Should I provide a class for links, that are not supposed to be ajaxified?
- Should I include the ScrollTo functionality of Balupton?
- How can I further improve the documentation in the GIST and on http://4nf.org/history-api/ ?
that's something i had to handle manually with History.js, just make sure there's a way to disable it, possibly with a default option to turnit on or off globally. Sometimes there's a script that you DO want to run every time it's loaded.Scripts are now compared with the previous page and deltas only are loaded!
if(xhr.getResponseHeader("Content-Type").indexOf('text/html') != -1) cDivs(h, 1);else location = href; //not HTML
// The getPage plugin
(function ($) {
// The Page class
var Page = function() { var $page;
this.a = function($this, t, p) {
if(!t) return $page;
if(t.indexOf('/') != -1) {
var xhr = $.get(t, function(h) {
if(!h || xhr.getResponseHeader("Content-Type").indexOf('text/html') == -1) {
location = t; //not HTML
return false;
}
What could be causing the error?
svecax :
Thanks for the encouragement!
-
Please use the "selector"
option...
Thanks Rick for your answer!
I've currently opened my first "Pull Request":
How is it conducted properly?
I thought it is ideal for initiating a code review at GitHub, but nobody is joining in?
Any ideas?
Regards, Arvind.
© 2013 jQuery Foundation
Sponsored by and others.