Нет необходимости проходить весь путь до сервера, чтобы получить новый диапазон, когда все, что вы делаете, это удаление класса и добавление нового класса в диапазон.
Также используя правильную область действия,$(this)
остановит действие всех ваших div1
элементов.
<script>
$(document).ready(function(){
$(".div1").click(function(){
//$(".div1").load("clicked.php");
$(this).children('span').removeClass('glyphicon-eye-open');
$(this).children('span').addClass('glyphicon-ok');
});
});
</script>
И заставит код переключаться с одного на другой при каждом нажатии
<script>
$(document).ready(function(){
$(".div1").click(function(){
if ( $(this).children('span').hasClass('glyphicon-ok') ) {
$(this).children('span').removeClass('glyphicon-ok');
$(this).children('span').addClass('glyphicon-eye-open');
} else {
$(this).children('span').removeClass('glyphicon-eye-open');
$(this).children('span').addClass('glyphicon-ok');
}
});
});
</script>