jquery - Incremental CSS positioning not working -


i swear should work, it's not. must missing simple:

html:

<div id="box"></div> 

css:

#box {     position: absolute;     background: blue;     width: 200px;     height: 200px;     left: 20px;     top: 20px; } 

javascript:

$('#box').click(function(e) {     if (e.shiftkey)         $(this).css('left', '70px');     else         $(this).css('left', '+=50'); }); 

if shift+click, box moves should. try clicking without shift, , box not increase left edge position 50px. gives?

see http://bugs.jquery.com/ticket/9237

the bug fixed in 1.6.2.

broken: http://jsfiddle.net/kwpuq/

fixed: http://jsfiddle.net/kwpuq/1/ - that's using "jquery (edge)"


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -