| $(queryselector) and dj(queryselector) functions |
$(queryselector) and dj(queryselector) functions
$('#queyselector');
This Function Will Select the element where id is queyselector.
The dj('#queyselector') function will exactly works same as $() Function.
Here is a Tip Use queryselector as we use in css.
dj('body .container #queyselector').hide();
$('#queyselector').text('new text');
or
dj('#queyselector').hide();
$() Function is Here ( Described ).1.
dj('#id').hide(); This Function will hide the element from html document.
dj('#id').hide();
More About .hide() Method.
Parameters => none
See More->
2.
dj('#id').alert(); This Function will alert the innerHTML of element. Syntax :-
Parameters => none
See More->
dj('#id').alert();
More About .alert() Method.
Now, Some Combo of get and Set methods
3.
dj(query).html(a); This Function will return the innerHTML of element. Syntax :-
And if You want to set innerHTML of any element then pass the html in parameter of the html()
Syntax :-
Parameters => 1 See More->
4.
dj('#id').html();
And if You want to set innerHTML of any element then pass the html in parameter of the html()
Syntax :-
dj('#id').html('<h1> New HTML Here </h1>');
The HTML of the Selected Element will be Changed.
More About .html(a) Method.
4.
dj(query).html(a); This Function will return the value of element. &nbp;Syntax :-
And if You want to set value of any element then pass the value in parameter of the value()
Syntax :-
Parameters => 1 See More->
5.
dj('#id input').val();
And if You want to set value of any element then pass the value in parameter of the value()
Syntax :-
dj('#id input').val('<h1> New value Here </h1>');
The value of the Selected Element will be Changed.
More About .value(a) Method.
5.
dj(query).text(a); This Function will return the innerText of element. Syntax :-
And if You want to set innerText of any element then pass the html in parameter of the html()
Syntax :-
Parameters => 1 See More->
dj('#id').text();
And if You want to set innerText of any element then pass the html in parameter of the html()
Syntax :-
dj('#id').text('<h1> New Text Here </h1>');
The HTML of the Selected Element will be Changed.
More About .text(a) Method.

Post a Comment