Freeform Click for Details

  •  
/* ADD CLICK EVENT TO EMPLOYEES TO TOGGLE THEIR SPOTLIGHTS BASED ON COMMON CLASS NAMES*/
NWS.CustomFunctions.spotlightToggle(".EmployeeSlider",".EmployeeSpotLight",/(^|\s)(Emp\_[^\s]*)/,2);


/* - NWS CUSTOM FUNCTIONS --------------------------------------------------------- */
NWS.initNamespace('NWS.CustomFunctions', function (params) {
    return {
		spotlightToggle: function (clickedClass,shownClass,matchRx,rxIndex){
			$(clickedClass).on('click',function(){
				var trigger = $(this).attr("class").match(matchRx)[rxIndex];
				$(shownClass).each(function(){
						($(this).hasClass(trigger))?$(this).show():$(this).hide();
				});
			});
		}
    }
});
© 2017 Northwoods - all rights reserved.
top