Getting an Syntax error, unrecognized expression: http://www.google.com/ when trying to change the href


Keywords:jquery 


Question: 

I am trying to use jquery to change the href. For some reason I keep getting the error

Syntax error, unrecognized expression:

Here is my code

$('.testing-test-test-two').attr("href", "");

Here is my html

<li role="presentation" class="active dual-tab-toggle plans-tabs">
        <a href="" class="testing-test-test-two" aria-controls="tab-one" role="tab" data-link="seeker-header" data-toggle="tab">
          Job seekers
        </a>
 </li>

1 Answer: 

You have and extra " after the data-toogle="tab", it should work correctly this way:

<li role="presentation" class="active dual-tab-toggle plans-tabs">
  <a href="" class="testing-test-test-two" aria-controls="tab-one" role="tab" data-link="seeker-header" data-toggle="tab">
          Job seekers
        </a>
 </li>