var myObject = {
prop1: function () {
console.log('Анимация прошла!');
},
prop2: function () {
$('div').animate({
opacity: 0.25
}, 100, function () {
this.prop1();
}.bind(this));
}
}
myObject.prop2();
var myObject = function () {
/*А тут можно много чего приватного создать*/
var _class = {
prop1: function () {
console.log('Анимация прошла!');
},
prop2: function () {
$('div').animate({
opacity: 0.25
}, 100, function () {
_class.prop1();
});
}
};
return _class;
}();
myObject.prop2();
Include the HTML5 shiv in the of your page in a conditional comment and after any stylesheets. (c) https://github.com/afarkas/html5shiv
$fields = array(
'name' => 'Имя',
'phone' => 'Телефон',
// ...
);
$message = '<table>';
foreach ($fields as $key => $title)
{
if ($value = trim($_POST[$key]))
{
$message .= "<tr><td>$title:</td><td>$value</td></tr>";
}
}
$message .= '</table>';
$message = '
<table>
'.(isset($_POST['name'])&&trim($_POST['name'])!=''?'
<tr>
<td>Имя: '.$_POST["name"].'</td>
</tr>
':'').'
'.(isset($_POST['tel'])&&trim($_POST['tel'])!=''?'
<tr>
<td>Телефон '.$_POST["tel"].'</td>
</tr>
':'').'
'.(isset($_POST['date'])&&trim($_POST['date'])!=''?'
<tr>
<td>Дата '.$_POST["date"].'</td>
</tr>
':'').'
</table>
';