Skip to main content

Bug Tracker

Side navigation

Ticket #6912: test-6912.html


File test-6912.html, 0.6 KB (added by dmethvin, August 19, 2010 01:56AM UTC)
<!DOCTYPE html> 
<html> 
<head> 
<title></title> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript"></script>
<script type="text/javascript"> 
$(function(){

var x = $("#test").add("#chooser");

alert("add selector: "+ (x.length==2? "pass" : "fail"));

var y = $("#test").add(document.getElementById("chooser"));

alert("add DOMElement: "+ (y.length==2? "pass" : "fail"));

});
</script> 
</head> 
<body> 

<div id="test"> this is all there is to see </div>
<select id="chooser">
 <option> unless   </option>
 <option> there is </option>
 <option> a bug    </option>
</select>

</body> 
</html>

Download in other formats:

Original Format