andreychaki,
в
.length у Вас русская е.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type="text/javascript" src="http://yandex.st/jquery/1.4.4/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/normalize.css">
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<style type="text/css">
.obcont img.Left {
border:2px solid green;
}
.obcont img.Right {
border:2px solid red;
}
.obcont img {
border:2px solid blue;
padding:0;
margin:2px;
}
</style>
</head>
<body>
<div class="obcont">
<img style="float: left;" src="img1.jpg">
<img style="float: left;" src="img1.jpg">
<img style="float: right;" src="img1.jpg">
<img src="img1.jpg">
<img src="img1.jpg">
<img src="img1.jpg">
</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
$('div.obcont > img').each(function(){
var a=$(this).css('float')=='left';
var b=$(this).css('float')=='right';
if(a) $(this).addClass('Left');
if(b) $(this).addClass('Right')
});
});
</script>
</html>
в
.length у Вас русская е.