Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
var EnjoyHintWizard = /**@class*/ (function () {
function EnjoyHintWizard() {
var _this = this;
this.enjoyhint_instance = new EnjoyHint({});
this.enjoyhint_script_steps = [
'key .field-survey-name' : __('input_survey_name'),
keyCode : 13,
showSkip: false
'next .form-builder-start-page' : __('select_element'),
nextButton: {
text: __('next')
showSkip: false
'click .tab-questions' : __('select_element'),
showSkip: false
'click .fa-map-marker' : __('go_to_point'),
showSkip: false
'click .btn-add_point' : __('click_on_btn_add_point'),
showSkip: false
'key .input-point-name' : __('fill_this_fields'),
keyCode: 13,
showSkip: false
'custom .fields-add-point' : __('fill_this_fields'),
event: function () {
onBeforeStart: function () {
console.log('this');
//_this.enjoyhint_instance.trigger('click_enter');
// var inputField = $('.input-point-name').find('input[type="text"]');
// console.log(inputField);
// $(document).ready(function() {
// inputField.keyup(function (event) {
// if (event.keyCode === 13) {
// console.log('entered');
// if (inputField.val() || inputField.val() !== '') {
// _this.enjoyhint_instance.trigger('click_enter');
// }
// }
// });
// });
showSkip: false
'custom .btn-save-point' : __('click_save_point'),
event: 'custom_event_name',
onBeforeStart: function () {
_this.enjoyhint_instance.trigger('custom_event_name');
console.log(_this.enjoyhint_instance.getCurrentStep());
showSkip: false
'click .btn-download-sticker' : __('click_btn_download'),
skipButton: {
text: __('skip')
EnjoyHintWizard.prototype.startTour = function () {
this.enjoyhint_instance.set(this.enjoyhint_script_steps);
this.enjoyhint_instance.run();
EnjoyHintWizard.prototype.resumeTour = function () {
this.enjoyhint_instance.reRunScript(13);
return EnjoyHintWizard;
}());
When i press button Enter exec next step although previous field if empty.
It is my all code. I try add trigger for custom event but it not helped.
I look in official documentation but hes very short https://github.com/xbsoftware/enjoyhint
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.