You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Regarding trigger of JQuery Events

Received Response
23
Views
5
Comments
edited Mar 27, 2019 6:56AM in Visual Builder 5 comments

Summary

JQuery events are not triggered

Content

Hi,

I have an issue where the JQuery events are not getting triggered inspite of defining it in the JS functions.

Could you please let know what are the steps to be followed so that JQuery is enabled and events are getting triggered.

Normal java script functions are working but jquery events are not getting invoked.

I have attached the code snippet in the code snippet section.

Version

14.8.5

Code Snippet

define([jQuery], function ($) {
  'use strict';

  var AppModule = function AppModule() {};

  /**
   *
   * @param {String} arg1
   * @return {String}
   */
  AppModule.prototype.jquerymain = function (arg1) {
    
    initDropDownClasses();

  };

  return AppModule;
});

function initDropDownClasses() {
	jQuery('.anchor-links li, .add-nav>ul>li').each(function() {
		var item = jQuery(this);
		var drop = item.find('ul, .drop');
		var link = item.find('a').eq(0);
		if (drop.length) {
			item.addClass('has-drop-down');
		}
	});
}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!