$('.dynamic-element').on('something', function(ev){ ... })
$(document).on('something', '.dynamic-element', function(ev){ ... })
$('.my-form').on('something', '.dynamic-element', function(ev){ ... })
$('[id^="product"]').each(function() {
var card = $(this);
if (card.hasClass('category_2')) {
card.find('.after_price').text('Какой-то текст');
}
});
$('.category_2').each(function() {
$(this).find('.after_price').text('Какой-то текст');
});
dataBase = [
{
fullName : '',
dateOfBirth : '',
address : '',
faculty : '',
spetsial : '',
course : '',
institution : ''
},
{
fullName : '',
dateOfBirth : '',
address : '',
faculty : '',
spetsial : '',
course : '',
institution : ''
}
...
];
dataBase[1].fullName
1) Как отправлять цену каждой строки заказа, если она в теге p ? Рядом ставить скрытый input и делать связь?
2) Как отправлять выбранный выпадающий div? Рядом ставить скрытый input и делать связь?
3) Как правильно организовать отправку такой динамической формы?
$db->query('insert into ' . TABLE_OPTIONS . ' set `object_id` = \'' . $id . '\', `option` = \'' . $type . '\', `date_added` = \'' . $timestamp . '\\', ' . $str_expires . ' ');
return 1;
}
$table_options = TABLE_OPTIONS;
$db->query("
INSERT INTO {$table_options}
SET
`object_id`='{$id}',
`option`='{$type}',
`data_added`='{$timestamp}',
`date_expired`='{$str_expires}'
");
return true;
$result = @mysqli_query($this->link, $this->sql);
->query_count++;
$result = @mysqli_query($this->link, $this->sql);
$query_count++;
<?= time() ?>
ALTER TABLE `statistic` DROP INDEX `date`;
ALTER TABLE `statistic` ADD INDEX `date` (`date`);
add_filter("query_vars", function($vars) {
array_push($vars, "handler");
return $vars;
});
add_filter("rewrite_rules_array", function($rules) {
$newrules['custom/([0-9a-z-]{1,128})'] = 'index.php?pagename=custom&handler=$matches[1]';
return $newrules + $rules;
});
add_action("wp_loaded", function() {
global $wp_rewrite;
$wp_rewrite->flush_rules();
});
$news = R::find("news", " title LIKE ? ", ["%$word%"]);
foreach ($news as $entry) {
echo "<h5>{$entry['title']}</h5>";
}
set_error_handler(function ($severity, $message, $file, $line) {
if (!(error_reporting() & $severity)) {
return;
}
throw new ErrorException($message, 0, $severity, $file, $line);
});
try {
// do something
send($id, $parentId, $name, $data)
} catch (\Throwable $e) {
// handle error
};
The asterisk serves as the truncation (or wildcard) operator. Unlike the other operators, it should be appended to the word to be affected. Words match if they begin with the word preceding the * operator.
If a word is specified with the truncation operator, it is not stripped from a boolean query, even if it is too short (as determined from the ft_min_word_len setting) or a stopword. This occurs because the word is not seen as too short or a stopword, but as a prefix that must be present in the document in the form of a word that begins with the prefix. Suppose that ft_min_word_len=4. Then a search for '+word +the*' will likely return fewer rows than a search for '+word +the':
The former query remains as is and requires both word and the* (a word starting with the) to be present in the document.
The latter query is transformed to +word (requiring only word to be present). the is both too short and a stopword, and either condition is enough to cause it to be ignored.