Shalvin Interests

Friday, January 14, 2011

jQuery with Visual Studio 2010

Applying CSS based on click event
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="5JQueryCSS.aspx.cs" Inherits="_5JQueryCSS" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

</head> 
    <title></title>
    <script src="Scripts/jquery-1.12.1.js"></script>
    <script>
        $("document").ready(function()
        {
            $("#btnHighlight").click(function ()
            {
                $("p").css("border", "3px solid red");
                return false;
            });
         
        });
        </script>
    <form id="form1" runat="server">
    <div>
    
        <p>Shalvin</p>
        <p>Biju</p>
        <p>Reny</p>

        <h3>JavaScript Technologies</h3>
        <ul>
            <li>JQuery</li>
            <li>AngularJS</li>
            <li>CommonJS</li>
            <li>NodeJS</li>
        </ul>
    </div>
        <asp:Button ID="btnHighlight"  runat="server" Text="Highlight" />
    </form>
</body>
</html>

No comments:

Post a Comment