jQuery Events

Table of Contents

Visual Portfolio has a lot of jQuery events that let you extend functionality. Example:

Available events

Event NameAttributesDescription
init.vpf–called after the portfolio fully inited
destroy.vpf–called after portfolio destroyed
initOptions.vpf–called after new options inited
initEvents.vpf–called after new events inited
destroyEvents.vpf–called after events destroyed
initLayout.vpf–called after layout inited
addItems.vpf$items, removeExistingcalled after new items added to the portfolio
removeItems.vpf$items, removeExistingcalled after items removed from the portfolio
startLoadingNewItems.vpfurlcalled before AJAX started to load new items
loadedNewItems.vpf$newVP, removeExisting, datacalled after AJAX loaded new items
endLoadingNewItems.vpf–called after AJAX loaded new items and removed loading state from portfolio
initCustomColors.vpf–called after custom colors rendered
addStyle.vpfselector, styles, media, stylesListcalled after added new custom styles
removeStyle.vpfselector, styles, stylesListcalled after removed custom styles
renderStyle.vpfstylesString, stylesList, $stylecalled after rendered custom styles

Vendor plugins

Event NameAttributesDescription
beforeInitIsotope.vpfoptionscalled before Isotope inited
initIsotope.vpfoptionscalled after Isotope inited
destroyIsotope.vpf–called after Isotope destroyed
beforeInitFjGallery.vpfoptions, additionalDatacalled before fjGallery inited
initFjGallery.vpfoptions, additionalDatacalled after fjGallery inited
destroyFjGallery.vpf–called after fjGallery destroyed
beforeInitSwiper.vpfoptionscalled before Swiper inited
initSwiper.vpfoptionscalled after Swiper inited
destroySwiper.vpf–called after Swiper destroyed
beforeInitFancybox.vpfoptions, items, indexcalled before Fancybox inited
initFancybox.vpfoptions, items, index, instancecalled after Fancybox inited
destroyFancybox.vpf–called after Fancybox destroyed
afterShowFancyboxeventcalled right after Fancybox show
beforeInitPhotoSwipe.vpfoptions, items, index, instancecalled before PhotoSwipe inited
initPhotoSwipe.vpfoptions, items, index, instancecalled after PhotoSwipe inited
destroyPhotoSwipe.vpf–called after PhotoSwipe destroyed
Was this page helpful?