jQuery, JavaScript, homeworks-app.com
All jQuery and JavaScript statements from homeworks-app.com, which I have to learn.
All jQuery and JavaScript statements from homeworks-app.com, which I have to learn.
-
- 1 / 20
-
Cartes-fiches
Get id of selected 'select option'?
select.children(':selected').attr('id');
Show hidden 'element'?
element.show();
Hide displayed 'element'?
element.hide();
Get or set value of 'input, textarea, select'?
input.val();
Remove 'element' from html?
element.detach();
Create 'input' element?
$('');
Get or set attributes of 'element'?
element.attr();
Set type attribute of 'element' to text?
element.attr('type', 'text');
Import bool from 'php' to 'JavaScript'?
echo json_encode($bool);
Set class attribute of 'element' to "class"?
element.addClass('class');
Set text of 'input' to "text"?
input.val('text');
Set text of 'button' to "text"?
button.html('text');
Add child element to parent element?
parent.append(child);
Observe 'input' for first interaction?
input.bind('keydown', function(event) {});
Disable selecting option for input of keydown event observer?
event.preventDefault();
Add jQuery datepicker to 'input'?
input.datepicker();
Delete 'select's' option values?
select.empty();
Send post request to page: "test.php" and handle completion.
$.post('test.php', {}).done(function (data) {});
Catch error of post request?
.fail(function (xhr, textStatus, errorThrown) { xhr.statusText; xhr.responseText; xhr.status; errorTrown; });
Redirect to url: "test.php"?
window.location = 'test.php';