Welcome Guest, Not a member yet? Register   Sign In
Jquery not working
#1

[eluser]aum[/eluser]
Hi All,

i am trying to run a code based on jquery but its not running at all
Below is the code
Code:
<head>
    <title>Janko At Warp Speed - Enhance your input fields with simple CSS tricks example</title>
    <style type="text/css">
        body
        {
            font-family: Arial, Sans-Serif;
            font-size: 13px;
        }
    #inputArea
    {
        font-family: Arial, Sans-Serif;
        font-size: 13px;
        background-color: #d6e5f4;
        padding: 10px;
        width:310px;
    }
    #inputArea input, #inputArea textarea
    {
        font-family: Arial, Sans-Serif;
        font-size: 13px;
        margin-bottom: 5px;
        display: block;
        padding: 4px;
        width: 300px;
    }

        .activeField
        {
            background-image: none;
            background-color: #ffffff;
            border: solid 1px #33677F;
        }
        .idle
        {
        border: solid 1px #85b1de;
        background-image: url( 'blue_bg.png' );
        background-repeat: repeat-x;
        background-position: top;
        }
    </style>
    [removed][removed]



    [removed]
        if(jQuery) {
            alert("Loaded");
        }
        $(document).ready(function(){
        $("input, textarea").addClass("idle");
            $("input, textarea").focus(function(){
                $(this).addClass("activeField").removeClass("idle");
        }).blur(function(){
                $(this).removeClass("activeField").addClass("idle");
        });
        });
    [removed]

</head>
<body>
    <h2><a href="www.jankoatwarpspeed.com">Janko At Warp Speed</a></h2>
    <p>This example is from the article <a href="http://www.jankoatwarpspeed.com/post/2008/05/22/CSS-Message-Boxes-for-different-message-types.aspx">Enhance your input fields with simple CSS tricks</a></p>
    <div id="inputArea">
        <label for="txtName">
            Name</label>
        &lt;input id="Text16" type="text" /&gt;
        <label for="txtEmail">
            Email</label>
        &lt;input id="Text17" type="text" /&gt;
        <label for="txtWebsite">
            Website</label>
        &lt;input id="Text18" type="text" /&gt;
        <label for="txtComment">
            Comment</label>
        &lt;textarea id="Textarea6" rows="4" cols="30"&gt;&lt;/textarea></div>
&lt;/body&gt;
&lt;/html&gt;

i just copied it from some working example
http://www.jankoatwarpspeed.com/examples...ut-fields/

but same is not working at my local machine while the alert in script showing that jquery is getting loaded .
can any one help me to find out the error

Regards,
Umesh


Messages In This Thread
Jquery not working - by El Forum - 10-28-2009, 01:59 AM
Jquery not working - by El Forum - 10-28-2009, 07:04 AM
Jquery not working - by El Forum - 10-28-2009, 08:09 AM
Jquery not working - by El Forum - 10-28-2009, 08:48 AM
Jquery not working - by El Forum - 10-28-2009, 08:58 AM
Jquery not working - by El Forum - 10-28-2009, 08:05 PM
Jquery not working - by El Forum - 10-29-2009, 12:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB