--- /dev/null
+<div class="user">This is a user</div>
+<div class="user">This is a user</div>
+<div class="teacher">This is a teacher</div>
return this.bind("load", url);
var off = url.indexOf(" ");
- var selector = url.slice(off, url.length);
- url = url.slice(0, off);
+ if ( off >= 0 ) {
+ var selector = url.slice(off, url.length);
+ url = url.slice(0, off);
+ }
callback = callback || function(){};
$('#first').load("data/name.html", start);
});
+test("load('url selector')", function() {
+ expect(1);
+ stop(true); // check if load can be called with only url
+ $('#first').load("data/test3.html div.user", function(){
+ equals( $(this).children("div").length, 2, "Verify that specific elements were injected" );
+ start();
+ });
+});
+
test("load(String, Function) - simple: inject text into DOM", function() {
expect(2);
stop();