function getFilteredData(filter = []) {
$.ajax({
url: 'site/filterController',
type: 'POST',
dataType: 'json',
data: {
filter: filter,
},
error: function (e) {
// функция если какая-то ошибка
console.log(e);
}
})
.done(function (data) {
// функция обработки полученных данных
console.log(data);
});
});
$('.children').click(function () {
$card = $(this).closest('.card');
$card_text = $(this).closest('.card-header').siblings('.card-body').children('.card-text')
if ($(this).attr('data-downloaded') == 'false') {
$(this).attr('data-downloaded', 'true')
getStructure($card.attr('data-parent'), $card_text)
}
else {
}
});
the difference between
__FUNCTION__ and __METHOD__ as in PHP 5.0.4 is that
__FUNCTION__ returns only the name of the function
while as __METHOD__ returns the name of the class alongwith the name of the function
class trick
{
function doit()
{
echo __FUNCTION__;
}
function doitagain()
{
echo __METHOD__;
}
}
$obj=new trick();
$obj->doit();
output will be ---- doit
$obj->doitagain();
output will be ----- trick::doitagain
$wfields[$cid] = "<span class='someclass'>{$c['cCID']}</span> {$c['cName']}";