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.
The forum of the forums
2 posters

    How do I use class in the code

    midoweb96
    midoweb96
    Forumember


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

    Solved How do I use class in the code

    Post by midoweb96 December 21st 2011, 3: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
    avatar
    Guest
    Guest


    Solved Re: How do I use class in the code

    Post by Guest December 21st 2011, 3: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>');
        });
    Nera.
    Nera.
    Energetic


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

    Solved Re: How do I use class in the code

    Post by Nera. December 21st 2011, 3: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.
    midoweb96
    midoweb96
    Forumember


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

    Solved Re: How do I use class in the code

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

    Thank you Spankers , Nera
    Solved
    Smile
    Nera.
    Nera.
    Energetic


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

    Solved Re: How do I use class in the code

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

    Topic Solved & Locked

      Current date/time is November 11th 2024, 2:24 pm