add title tag for anchor tag using jquery

```
(function($){
$(document).ready(function(){
setTimeout(function(){
var counter = 0;
$('a').each(function(){
 if(!$(this).is('[title]') || !$(this).attr('title').length){
  $(this).attr('title', 'sitename');
 }
 var titleEq = $(this).attr('title');
if(titleEq === titleEq){
$(this).attr('title', titleEq + counter++ );
}
});
$('form#search_mini_form .magnifying-glass').attr('type','submit');
$('#algolia-autocomplete-container .aa-dropdown-menu').attr('aria-label','listbox');
$('iframe').attr('title','iframe'+ counter++);

$('#mainmenu .featured-products-slider .product-item-details [id]').each(function(){
var navPrId = $(this).attr('id');
$(this).attr('id', navPrId + counter++ );
});
},1000);
});
})(jQuery);
```

Comments

Popular posts from this blog

TypeScrpt basics

font-face HTTPS issue fixes