Fix issues with a missing jQuery $
This commit is contained in:
parent
db64e511d0
commit
86fa9330f8
|
@ -24,10 +24,10 @@ class Typer {
|
||||||
* blinking for after the text
|
* blinking for after the text
|
||||||
* finishes typing.
|
* finishes typing.
|
||||||
*/
|
*/
|
||||||
constructor(element: HTMLElement, blink: number, blink_timeout: number) {
|
constructor(element: JQuery<HTMLElement>, blink: number, blink_timeout: number) {
|
||||||
// Retrieve the current content and wipe it. We also make the
|
// Retrieve the current content and wipe it. We also make the
|
||||||
// element visible if it was hidden.
|
// element visible if it was hidden.
|
||||||
this.element = $(element);
|
this.element = element;
|
||||||
this.text = this.element.html();
|
this.text = this.element.html();
|
||||||
this.element.html("");
|
this.element.html("");
|
||||||
this.element.css("visibility", "visible");
|
this.element.css("visibility", "visible");
|
||||||
|
@ -114,6 +114,6 @@ class Typer {
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(($) => {
|
jQuery(($) => {
|
||||||
const typer = new Typer($(".head-line .typed").get(0), 500, 3000);
|
const typer = new Typer($(".head-line .typed").first(), 500, 3000);
|
||||||
typer.type();
|
typer.type();
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue