Bug Tracker

Ticket #5591: bug.html

File bug.html, 1008 bytes (added by namxam, 10 years ago)

Example code

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2   "http://www.w3.org/TR/html4/strict.dtd">
3
4<html lang="en">
5<head>
6  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7  <title>JavaScript jQuery Chrome Bug</title>
8  <meta name="author" content="Maximilian Schulz">
9  <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
10  <script type="text/javascript" charset="utf-8">
11    jQuery(function($) {
12     
13      $('a[data-confirm]').live('click', function(event) {
14        return confirm($(this).attr('data-confirm'));
15      });
16
17      // Unobtrusive javascript for htttp delete links
18      // Uses the new live method in jQuery 1.3+
19      $('a[data-http-method=delete]').live('click', function(event) {
20        alert('Deleted');
21      });
22     
23    });
24  </script>
25</head>
26<body>
27  <a href="http://google.com/" data-confirm="Are you sure you want to be redirected?" data-http-method="delete">Click me!</a>
28</body>
29</html>