ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

i have a problem with jquery in expression engine 2.4

March 20, 2012 11:48pm

Subscribe [3]
  • #1 / Mar 20, 2012 11:48pm

    Seke

    4 posts

    It’s not working correctly how to fix it the code is
    [removed][removed]
    [removed]
    (document).ready(function(){
    (”.flip”).click(function(){
    (”.panel”).slideToggle(“slow”);
    });
    });
    [removed]


    <style type=“text/css”>
    div.panel,p.flip
    {
    margin:0px;
    padding:5px;
    text-align:center;
    background:#e5eecc;
    border:solid 1px #c3c3c3;
    }
    div.panel
    {
    height:120px;
    display:none;
    }
    </style>

    <div class=“panel”>
    Username: <input type=“text” name=“username” value=”” maxlength=“32” size=“25”></p>
    Password: <input type=“password” name=“password” value=”” maxlength=“32” size=“25”></p>

    <button>LogIn</button>
    </div>

    this jquery not working in EE2.4.0 PLEASE HELP ME
    THANKS

  • #2 / Mar 21, 2012 1:44am

    the3mus1can

    426 posts

    Is this on the frontend of the site or in the CP?

  • #3 / Mar 21, 2012 2:08am

    Seke

    4 posts

    excuse me i don’t understand please tell me fully

  • #4 / Mar 21, 2012 3:16pm

    Man With A Peg

    124 posts

    Is this for the administrator or website visitors?

  • #5 / Mar 21, 2012 9:55pm

    Seke

    4 posts

    its only for website visitors how to use jquery in EE can u tell me please

  • #6 / Mar 21, 2012 10:16pm

    Man With A Peg

    124 posts

    To start, you need to make sure that jQuery is included in the your page (template) before you try to use it. You can use regular < script > tags or the ExpressionEngine tag that is outlined here:

    http://ellislab.com/expressionengine/user-guide/modules/jquery/index.html

  • #7 / Mar 21, 2012 10:20pm

    Seke

    4 posts

    i done this before some of the jquery working correctly but this code i wrote on the top isn’t working and i doesn’t understand why it’s not working

  • #8 / Mar 21, 2012 11:27pm

    Man With A Peg

    124 posts

    Aha. Well, we can’t read some of the code that you posted because it was filtered out by the forums. I do see that you have

    (”.flip”).click(function(){

    and

    (”.panel”).slideToggle(“slow”);

    What happens if you add a dollar sign onto the beginning of those lines? $() is actually a jQuery function, while () doesn’t do anything except group certain commands in JavaScript.

  • #9 / Mar 22, 2012 12:05am

    Seke

    4 posts

    Thanks a lot

  • #10 / Mar 22, 2012 8:25am

    Man With A Peg

    124 posts

    No problem, glad it helped!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases