Disable alt atribute

Go down

In progress Disable alt atribute

Post by fantastickmath on Tue 13 Sep - 11:16:06

Hi,
can i disable "alt" atribute from "img" html-tag for some imagine from my forum ?
I tried one jquery code but didn't succeed:
Code:
$('#id-of-imagin').attr('alt', '');
Ideas?


fantastickmath
Forumember

Male Posts : 31
Reputation : 0
Language : Ro

Back to top Go down

In progress Re: Disable alt atribute

Post by fantastickmath on Fri 16 Sep - 0:40:51

@fantastickmath wrote:Hi,
can i disable "alt" atribute from "img" html-tag for some imagine from my forum ?
I tried one jquery code but didn't succeed:
Code:
$('#id-of-imagin').attr('alt', '');
Ideas?

Up,
I wish if you tell me something, i dont care if it posibile or not...
You can tell me if it's not posibil i will stop waiting for answers.. bwi

fantastickmath
Forumember

Male Posts : 31
Reputation : 0
Language : Ro

Back to top Go down

In progress Re: Disable alt atribute

Post by ankillien on Fri 16 Sep - 10:08:29

Hi,

Something like this would work...

Code:
$('#id-of-imagin').removeAttr('alt');
avatar
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

http://www.webartzforum.com/

Back to top Go down

In progress Re: Disable alt atribute

Post by fantastickmath on Fri 16 Sep - 23:37:57

It's not work...TT
I took the code and i put it in Javascript codes management and it's not worked Sad

fantastickmath
Forumember

Male Posts : 31
Reputation : 0
Language : Ro

Back to top Go down

In progress Re: Disable alt atribute

Post by Guest on Sat 17 Sep - 3:02:29

The line of code is what you need. To use it in a Javascript file, however, you need to enclose it in a startup function, like this:

Code:
$(function() {
$('#id-of-imagin').removeAttr('alt');
});

Guest
Guest


Back to top Go down

In progress Re: Disable alt atribute

Post by ankillien on Sat 17 Sep - 3:53:04

Dion is correct. Also, don't forget to edit this part as per requirement...

$(function() {
$('#id-of-imagin').removeAttr('alt');
});
avatar
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

http://www.webartzforum.com/

Back to top Go down

In progress Re: Disable alt atribute

Post by Guest on Sat 17 Sep - 6:43:09

And don't forget:
Placement would be In all the pages... Wink

Guest
Guest


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum