Skip to content

Instantly share code, notes, and snippets.

@gregglind
Created November 30, 2010 21:59
Show Gist options
  • Save gregglind/722501 to your computer and use it in GitHub Desktop.
Save gregglind/722501 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Data Conlficts Example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
<script src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script>
<script>
$(
function(){
var owner;
owner = $('div').data('here').reporter;
$('div').append('<strong>'+owner+'</strong>');
}
);
</script>
</head>
<body>
<div data-here='{"reporter":"gregg"}'>The Bug Reporter here is: </div>
<pre>
In both chrome and safari on mac (others untested), IF
jquerytools is in the toolchain, then the owner is *not printed* and
we get:
Uncaught TypeError: Cannot read property 'reporter' of null
</pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment