<div id="sb" class="spoil_button">Оформить</div>
<script type="text/javascript">
$(document).ready(function() {
$('#sb').focus(function(){
alert('Элемент foo получил фокус.');
});
});
</script>
if(!empty($_POST['ADD'])) {
$itemID = intval($_POST['ADD']);
CModule::IncludeModule("sale");
CModule::IncludeModule("catalog");
$count = 1;
if(!empty($_POST['QUANTITY'])) {
$count = $_POST['QUANTITY'];
}
$arRewriteFields = array(
'CALLBACK_FUNC' => '',
'ORDER_CALLBACK_FUNC' => '',
'CANCEL_CALLBACK_FUNC' => '',
'PAY_CALLBACK_FUNC' => '',
'PRODUCT_PROVIDER_CLASS' => '',
);
Add2BasketByProductID($itemID, $count, $arRewriteFields);
echo json_encode(array(0=>$itemID));
}
"IBLOCK_ID" => "69",
"ELEMENT_ID" => $_REQUEST["ELEMENT_CODE"],
"ELEMENT_CODE" => "",
array(
"CONDITION" => "#^/sofas2/direct/([a-z0-9\-]+)/(\?.*|)$#",
"RULE" => "CODE=$1",
"ID" => "",
"PATH" => "/sofas2/direct/detail.php",
),