Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Redirect "Join Group" Button After Click.
- */
- function yzc_redirect_join_group_button_to_group() {
- ?>
- <script type="text/javascript">
- jQuery( document ).ready( function(){
- $( '.join-group' ).on( 'click', function( e ) {
- e.stopImmediatePropagation();
- // Redirect to link
- window.location.href = $( this ).attr( 'href' );
- });
- });
- </script>
- <?php
- }
- add_action( 'wp_footer', 'yzc_redirect_join_group_button_to_group' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement