CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: JavaScript

Jquery helpers

278 Views
Copy Code Show/Hide Line Numbers
//Document Ready
$(document).ready(function() {
 
});
 
//Add ie6 class
if ($.browser.msie && $.browser.version == "6.0") $('body').addClass("ie6");
 
 
//Jquery loaded check
    window.onload = function()
    {
        if (typeof(window.jQuery)!="undefined") 
        {}
    }   
 
// Listcontrol alt Row
<%# Container.DisplayIndex % 2 == 0 ? "" : "altRow" %>
 
//Gridview __doPostBack
    //Force Rendering clientside ASP default postback function in page_load
    Page.ClientScript.GetPostBackEventReference(new PostBackOptions(this)); 
    if (!string.IsNullOrEmpty(Request.Form["__EVENTTARGET"]))
    {
        if (Request.Form["__EVENTTARGET"] == "MyGridView")
        {
            string test = (Request.Form["__EVENTARGUMENT"]);
        }
    }      
    <input type="hidden" id="idInput" value='<%# Eval("ID")%>' />
 
    //Do postback
    $('.gridRow').click(function() {__doPostBack('MyGridView', $(this).find("#idInput").val());});
 
//ASP Cancel Event Bubble
    OnClientClick="event.cancelBubble = true;"
 
    <asp:ScriptManagerProxy runat="server" ID="ScriptProxy">
        <CompositeScript>
            <Scripts>
                <asp:ScriptReference Path="~/Scripts/jquery.watermark.min.js" />
            </Scripts>
        </CompositeScript>
    </asp:ScriptManagerProxy>
    
    
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/themes/smoothness/jquery-ui.css" type="text/css" rel="Stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js" type="text/javascript"></script>
 
 
by Arjan
  April 03, 2010 @ 4:19am
Tags:

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate