I have the following:
$("#article").on('click',
'a[href^="/C"], a[href^="/Java"], a[href^="/T"]', function (event) {
Can this be simplified to not repeat the “href” so many times. Can I use a different kind of regular expression?
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 option would be is to give the all the three anchor tags
a single class Name..Or any other selector that is common for these three..
Otherwise you cannot remove the
hrefas that looks unique to the anchor tags in context.