None
None

Reputation: 9267

How to remove tabindex on whole div?

I have this :

<div class="glass">
<input />
<input />
<select>
<option>aaaa</option>
</select>
</div>
<input />

What i want is to remove div with glass class from tabing that is cloned, so when i do tab it skip that div. Any suggestion ?

Im doing clone element :

 this.background = jQuery(this.content.nativeElement).clone()
        .addClass('glass').removeAttr('tabindex');

Upvotes: 0

Views: 1509

Answers (1)

fehrlich
fehrlich

Reputation: 2525

based on the w3c specs, the tabindex should be set to a negative value. Your code should look like this:

 this.background = jQuery(this.content.nativeElement).clone()
    .addClass('glass').prop('tabindex', -1);

Upvotes: 1

Related Questions