Created
January 11, 2018 12:04
-
-
Save celticwebdesign/2acef0d453e37b800b89226cddbb7cc7 to your computer and use it in GitHub Desktop.
PHP - select the last child with a specific class name in css
This file contains hidden or 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
// https://stackoverflow.com/questions/6401268/how-do-i-select-the-last-child-with-a-specific-class-name-in-css | |
if ( $( "section.recipe-collections" ).length > 1 ) { | |
$( "section.recipe-collections" ).last().addClass( "last" ); | |
} | |
// Allows the selection of the last element with specific class. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment