The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Disable alt atribute

View previous topic View next topic Go down

In progress Disable alt atribute

Post by fantastickmath on September 13th 2011, 11:16 am

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 September 16th 2011, 12:40 am

@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 September 16th 2011, 10:08 am

Hi,

Something like this would work...

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

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 September 16th 2011, 11:37 pm

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 September 17th 2011, 3:02 am

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 September 17th 2011, 3:53 am

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

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

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 September 17th 2011, 6:43 am

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

Guest
Guest


Back to top Go down

View previous topic View next topic Back to top


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