jQuery Events

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

Available events

Event NameAttributesDescription
init.vpfcalled after the portfolio fully inited
destroy.vpfcalled after portfolio destroyed
initOptions.vpfcalled after new options inited
initEvents.vpfcalled after new events inited
destroyEvents.vpfcalled after events destroyed
initLayout.vpfcalled 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.vpfcalled after AJAX loaded new items and removed loading state from portfolio
initCustomColors.vpfcalled 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.vpfcalled after Isotope destroyed
beforeInitFjGallery.vpfoptions, additionalDatacalled before fjGallery inited
initFjGallery.vpfoptions, additionalDatacalled after fjGallery inited
destroyFjGallery.vpfcalled after fjGallery destroyed
beforeInitSwiper.vpfoptionscalled before Swiper inited
initSwiper.vpfoptionscalled after Swiper inited
destroySwiper.vpfcalled after Swiper destroyed
beforeInitFancybox.vpfoptions, items, indexcalled before Fancybox inited
initFancybox.vpfoptions, items, index, instancecalled after Fancybox inited
destroyFancybox.vpfcalled 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.vpfcalled after PhotoSwipe destroyed
Was this page helpful?