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.

How do I use class in the code

View previous topic View next topic Go down

Solved How do I use class in the code

Post by midoweb96 on December 21st 2011, 9:26 pm

hi

How do I use class in the code ?
Code:
    $(document).ready(function() {  $('#text_editor_textarea').before('<div class="aviso_normas"><b>Antes de postear en el foro de soporte recuerda: <a href="http://url del tema">¿Cómo crear un tema? </a></b></div>');
    });
http://asistencia.foroactivo.com/t109637-aviso-antes-de-postear


this ID (#text_editor_textarea)
Can I use a class instead of ID ?

Very Happy

midoweb96
Forumember

Posts : 166
Reputation : 12
Language : Css - Html - Jquery

Back to top Go down

Solved Re: How do I use class in the code

Post by Guest on December 21st 2011, 9:35 pm

Yes, of course. It's like:
Code:
$(document).ready(function() {  $('.class').before('<div class="aviso_normas"><b>Antes de postear en el foro de soporte recuerda: <a href="http://url del tema">¿Cómo crear un tema? </a></b></div>');
    });

Guest
Guest


Back to top Go down

Solved Re: How do I use class in the code

Post by Nera. on December 21st 2011, 9:35 pm

Hi,

You can use a class but your quick replay is an ID and if you want that to be applayed on your quick replay you must use the ID. If you want it to be applied (random example) to lets say navigation you'll use a class: a.mainmenu instead of #text_editor_textarea.

Edit: Sorry Gassy, wrote at the same time.

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

Solved Re: How do I use class in the code

Post by midoweb96 on December 21st 2011, 10:00 pm

Thank you Spankers , Nera
Solved
Smile

midoweb96
Forumember

Posts : 166
Reputation : 12
Language : Css - Html - Jquery

Back to top Go down

Solved Re: How do I use class in the code

Post by Nera. on December 21st 2011, 10:01 pm

Topic Solved & Locked

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

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