Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the value of multiple html attribute?

Tags:

html

jquery

i want to change this html element.

<a class="btn small fileupload_cancel" title="cancel upload">cancel upload</a>

to

<a class="btn small fileupload_cancel" title="remove all">remove all</a>

what is the most feasible solution for this ?

thank you

like image 981
Ibrahim Azhar Armar Avatar asked Jan 18 '23 12:01

Ibrahim Azhar Armar


2 Answers

This should help you:

$("a.btn.small.fileupload_cancel").attr("title", "remove all").html("remove all");

Let me know if you need anything else..

like image 115
Deleteman Avatar answered Jan 21 '23 01:01

Deleteman


$('.fileupload_cancel').attr('title','remove all').text('remove all');
like image 40
Bless Yahu Avatar answered Jan 21 '23 01:01

Bless Yahu