Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger function like tiType, tiDelete ... from outside #42

Closed
motordigital opened this issue Jul 10, 2017 · 1 comment
Closed

Trigger function like tiType, tiDelete ... from outside #42

motordigital opened this issue Jul 10, 2017 · 1 comment

Comments

@motordigital
Copy link

It's possible to chain several typing function to one narrative:

$('.type-it').typeIt({})
.tiType('I type some text pretty fasst')
.tiDelete(2)
.tiType('t!');

It would be great to have the functions available as public methods, to manipulate a typed text later on, e.g. like this:

	$('.write-more').click(function() {
		$('.type-it').typeIt().tiDelete(1).tiType(' and I do not like to stop.');
	});

or

	$('.write-more').click(function() {
		$('.type-it').trigger('tiType', ' and I do not like to stop.');
	});

Or is this already possible and I have not got the trick?

@motordigital
Copy link
Author

Maybe not the best way, but adding an alternative function to the init, which keeps the object state, works fine. See my fork: motordigital@dc9d2ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants