Bug Tracker

Ticket #5868: contains_fail_test.htm

File contains_fail_test.htm, 685 bytes (added by gloddy, 12 years ago)

test case for contains failure

Line 
1<!DOCTYPE html>
2<html lang="en">
3<head>
4  <meta charset="utf-8">
5  <title>jQuery :contains selector error test case</title>
6  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
7  <script type="text/javascript">
8    function data_in_contains(){
9      $('ul li:contains("One")').fadeOut();
10    }
11   
12    function data_in_variable_passed_to_contains(){
13      value_in_variable = "Two";
14      $('ul li:contains(value_in_variable)').fadeOut();
15    }
16
17    $(document).ready(function(){
18      data_in_variable_passed_to_contains();
19      data_in_contains()
20    });
21  </script>
22</head>
23<body>
24  <ul>
25    <li>One</li>
26    <li>Two</li>
27  </ul>
28</body>
29</html>