JQuery Events

Available Custom jQuery events:

wpc-button-completed::post ID-Button Name
wpc-page-completed::post ID
wpc-course-completed::Course Name


Want to trigger some javascript once the user completes a page?

jQuery(document).on('wpc-page-completed', function(e) {
// do something awesome!

Need something to happen when a specific page is completed? Use the post’s ID:

jQuery(document).on('wpc-page-completed::430', function(e) {
// do something awesome!

Want to celebrate when your students finish any of your courses?

jQuery(document).on('wpc-course-completed', function(e) {
// Trigger confetti falling or something else awesome!

Only want to celebrate when they finish a specific course?

jQuery(document).on('wpc-course-completed::Course Name', function(e) {
// do something awesome!

You can also use this for when buttons are completed. If you want to do it for ANY button, use:

jQuery(document).on('wpc-button-completed', function(e) {
// trigger custom javascript!

If you want to trigger when a SPECIFIC button is completed, use that button’s post ID and name:

jQuery(document).on('wpc-button-completed::430-Video-3', function(e) {
// trigger custom javascript!

To mark a button as complete with javascript, you’d use:

jQuery(document).ready(function() {

Return to support

Want 10% off the PRO version of WPComplete, just for hopping on our list?

No spam or BS, just product update emails.