-
-
Save Preciousomonze/e48a77ff26370203a5d28e43669b1fb4 to your computer and use it in GitHub Desktop.
Basic js to help in a “readmore” scenario for a friend.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery( function($) { | |
$( document ).on( 'click', '.ola-section-readmore', function( event ) { | |
event.preventDefault(); | |
console.log("workssss"); | |
// Get the clicked element section cover. | |
$_ParentEl = $(this).closest( '.ola-section-cover' ); | |
// Now trigger the necessary for the clicked item. | |
$_ParentEl.find( '.short-d' ).css( 'display', 'none' ); | |
$_ParentEl.find( '.full-d' ).css( 'display', 'block' ); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment