Bug Tracker

Ticket #2090: css.html

File css.html, 786 bytes (added by nostrademons, 12 years ago)

.css test case

Line 
1<script type = "text/javascript" src = "../../public/static/js/jquery.js"></script>
2Has attribute, in DOM: <span id = "eg1">changeme</span><br />
3Has attribute, not in DOM: <span id = "eg2">changeme</span><br />
4Doesn't have attribute, in DOM: <span id = "eg3">changeme</span><br />
5Doesn't have attribute, not in DOM: <span id = "eg4">changeme</span><br />
6<div id = "inDOM" style = "display: none"></div>
7<script type = "text/javascript">
8$(document).ready(function() {
9    var newDiv = $('<div style = "display: none"></div>');
10    $('#eg1').text($('#inDOM').css('display'));
11    $('#eg2').text(newDiv.css('display'));
12    $('#eg3').text($('#inDOM').css('margin') || 'changed');
13    $('#eg4').text(newDiv.css('margin') || 'changed');
14    alert('Done');
15});
16</script>