$window.on('scroll', onScroll);
<?php if ($categories) : ?>
<div class="list">
<ul><li>
<?php
$cols = 2; // число колонок
$view = ceil( count($categories) / $cols );
$counter = 0;
foreach ($categories as $category) : ?>
<div>
<a href="<?php echo $category['href']; ?>">
<img src="<?php echo $category['thumb']; ?>" title="<?php echo $category['name']; ?>" alt="<?php echo $category['name']; ?>" />
<span><?php echo $category['name']; ?></span>
</a>
</div>
<?php
$counter++;
if( $counter == $view) {
echo "</li><li>";
$counter = 0;
?>
<?php endforeach; ?>
</li></ul>
</div>
<?php endif; ?>
<!-- CODE BLOCK NAME -->
<!-- /CODE BLOCK NAME -->
<div id="..."><table> тут одна строка таблицы </table></div>
$(".selector").change(function() {
operation = true;
})
if (operation == false) {
$("#int0").click(function() {
console.log("Операція == : " + operation);
console.log("number1");
})
} else if (operation == true) {
$("#int0").click(function() {
console.log("number2");
})
}
var operation = false,
operationChange = function(){
if (operation){
$("#int0").click(function() {
console.log("Операція == : " + operation);
console.log("number1");
});
} else {
$("#int0").click(function() {
console.log("number2");
});
}
};
$(".selector").change(function() {
operation = ! operation;
operationChange();
});
operationChange();
JSON.stringify(data)
JSON.parse( Сохраненные данные )