Select a div that ends with a class
1 answer
@Einacio commented that $("div[class$='-something']") will not work for <div class="foo-something abc"> . To select this case, you can add a second selector with the following result:
$("div[class$='-something'],div[class*='-something ']")
This will select both classes ending in -something, and a space follows.
Open this one for more information.
+18