Answers for "how load jquery code in vue"

1

how load jquery code in vue

1 - npm install --save jquery
2 - create mounted(){}
3 - place your jquery code in that
like this =>


mounted(){
			// FAQ Accordion JS
			$('.accordion').find('.accordion-title').on('click', function(){
			// Adds Active Class
			$(this).toggleClass('active');
			// Expand or Collapse This Panel
			$(this).next().slideToggle('fast');
			// Hide The Other Panels
			$('.accordion-content').not($(this).next()).slideUp('fast');
			// Removes Active Class From Other Titles
			$('.accordion-title').not($(this)).removeClass('active');		
		});
	}
Posted by: Guest on June-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language