The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How do I use class in the code

2 posters

Go down

Solved How do I use class in the code

Post by midoweb96 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
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 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>');
    });
avatar
Guest
Guest


Back to top Go down

Solved Re: How do I use class in the code

Post by Nera. 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.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Solved Re: How do I use class in the code

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

Thank you Spankers , Nera
Solved
Smile
midoweb96
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. December 21st 2011, 10:01 pm

Topic Solved & Locked
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

Back to top

- Similar topics

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