How would I use the following code to run a function on any div with the class of .p11button which also has display:block?
if (VARIABLE = true) {
$('div .p11-button').css('display') == 'block'
FUNCTION HERE
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try the following:
In your code example you were assigning variable to true in the condition – this would always evaluate to true! Also, the space in your selector means you will select descendents of divs with class p11-button.