When exposing a jquery script that will be used across multiple pages is it preferred to base the selector on an id or css class?
Share
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.
The best practice would be to use both: ids whenever you need to select elements that are unique within a page and classes whenever you need to select multiple elements.