Fixed the build/speed testing application to work with current versions of jQuery. The main changes were implementing :has() where necessary to replace functionality that no longer existed and to use noConflict() so the libraries wouldn't have to be modified for the speed testing.
So now the file jquery-basis.js will be tested against the jquery.js in the /dist directory. Version 1.2.1 is currently in jquery-basis.js.
This commit is contained in:
parent
2da897db84
commit
b0b5fa74b6
5 changed files with 5998 additions and 2255 deletions
|
@ -20,8 +20,8 @@
|
|||
jQuery(this).parent().children("*:gt(1)").remove();
|
||||
} catch(e) { }
|
||||
})
|
||||
var times = 5;
|
||||
jQuery("#times").html(times);
|
||||
// set # times to run the test in index.html
|
||||
var times = parseInt(jQuery("#times").val());
|
||||
jQuery.benchmarker.startingList = this.get();
|
||||
benchmark(this.get(), times, jQuery.benchmarker.libraries);
|
||||
}
|
||||
|
@ -33,10 +33,10 @@
|
|||
jQuery("tbody tr:first-child").remove();
|
||||
jQuery("td.test").before("<td><input type='checkbox' checked='checked' /></td>");
|
||||
jQuery("button.runTests").bind("click", function() {
|
||||
jQuery('td[input:checked] + td.test').benchmark();
|
||||
jQuery('td:has(input:checked) + td.test').benchmark();
|
||||
});
|
||||
|
||||
jQuery("button.retryTies").bind("click", function() { jQuery("tr[td.tie] td.test").benchmark() })
|
||||
jQuery("button.retryTies").bind("click", function() { jQuery("tr:has(td.tie) td.test").benchmark() })
|
||||
|
||||
jQuery("button.selectAll").bind("click", function() { jQuery("input[@type=checkbox]").each(function() { this.checked = true }) })
|
||||
jQuery("button.deselectAll").bind("click", function() { jQuery("input[@type=checkbox]").each(function() { this.checked = false }) })
|
||||
|
@ -52,8 +52,9 @@
|
|||
})
|
||||
})
|
||||
|
||||
var headers = jQuery.map(jQuery.benchmarker.libraries, function(i) {
|
||||
return "<th>" + i + "</th>"
|
||||
var headers = jQuery.map(jQuery.benchmarker.libraries, function(i,n) {
|
||||
var extra = n == 0 ? "basis - " : "";
|
||||
return "<th>" + extra + i + "</th>"
|
||||
}).join("");
|
||||
|
||||
jQuery("thead tr").append(headers);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue