<!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="utf-8">
                <title>Jaggery - Delicious Javascript</title>
                <meta name="description" content="">
                    <meta name="author" content="">

                        <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
                        <!--[if lt IE 9]>
                        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
                        <![endif]-->

                        <!-- Le styles -->
                        <link href="../css/bootstrap.css" rel="stylesheet">
                            <style type="text/css">
                            body {
                                padding-top: 60px;
                                }
                            </style>
                            <link href="../css/prettify.css" rel="stylesheet">
                                <!-- Le fav and touch icons -->
                                <link rel="shortcut icon" href="../images/favicon.ico">
                                    <link rel="apple-touch-icon" href="../images/apple-touch-icon.png">
                                        <link rel="apple-touch-icon" sizes="72x72"
                                        href="../images/apple-touch-icon-72x72.png">
                                            <link rel="apple-touch-icon" sizes="114x114"
                                            href="../images/apple-touch-icon-114x114.png">
                                            </head>

                                            <body>

                                                <%
                                                include('/includes/topnavi.jag');
%>

<div class="container-fluid" style="width: 960px; margin: auto;">
<div class="row">
    <div class="span16">
        <div class="page-header">
            <h1  id="top">
                Documentation
                <small>API documentation for Jaggery.js</small>
            </h1>
        </div>
    </div>
</div>

<div class="row">
<div class="span4">
    <div class="well">
        <%
        include('/includes/navi.jag');
        %>

    </div>

</div>
<div class="span12">
<div class="content" id="del" name="del">
<h3>del()</h3>

<pre class="prettyprint linenums">
&lt%
var data = {'key':'value'}; 
var headers = {'key', 'value'};
del(url, data, "text", headers, function (data, xhr) {
       log("Response received");
   }
);
%&gt
</pre>

    <div id="pageLinks">
        <a class="navilink" href="#overview">Overview</a>
        <%if(hasParams) {%>
        <a class="navilink" href="#parameters">Parameters</a>
        <%}%>
        <%if(hasRets) {%>
        <a class="navilink" href="#returnVals">Return values</a>
        <%}%>
    </div>

<section id="overview">

<h4>Overview</h4>
<p class="description"><code>del()</code> is a wrapper for XMLHTTPRequest's DELETE method.
                                                using <code>del()</code> you can avoid the use of XHR and shorten the server-side DELETE requests</p>
    <pre class="prettyprint">del(url[, data][, type][, headers][, success(data, xhr)])</pre>
    <pre class="prettyprint">var res = del(url[, data][, type][, headers])</pre>
                                            </section>

    <section id="parameters">
        <h4>Parameters</h4>
        <table class="clsStd operations-table">

            <tbody>

            <tr>

                <th>Parameter</th>
                <th>Type</th>
                <th>Description</th>

            </tr>

            <tr>
                <td><code>url</code></td>
                <td>String</td>
                <td>The URL which HTTP DELETE is performed </td>
            </tr>
            <tr>
                <td><code>data</code></td>
                <td>Object</td>
                <td>Request parameters</td>
            </tr>
            <tr>
                <td><code>type</code></td>
                <td>String</td>
                <td>The type, which the response is expected</td>
            </tr>
            <tr>
                <td><code>headers</code></td>
                <td>String</td>
                <td>Optional HTTP headers</td>
            </tr>
            <tr>
                <td><code>success(data:Object,<br/> xhr:Object)</code></td>
                <td>function</td>
                <td>On success callback</td>
            </tr>
            </tbody>
        </table>
    </section>


    <section id="returnVals">
        <h4>Return values</h4>
        <table class="clsStd operations-table">
            <tbody>
            <tr>
                <th>Value</th>
                <th>Type</th>
                <th>Description</th>
            </tr>
            <tr>
                <td><code>data</code></td><td>Object</td><td>Contains the return data of the HTTP DELETE request</td>
            </tr><tr>
                <td><code>xhr</code></td><td>Object</td><td>Contains an instance of XMLHTTPRequest</td>
            </tr>
            </tbody>
        </table>
    </section>
                                        </div>
                                        <!-- /del div -->
                                        <br>
                                            <br>
                                            </div>

                                        </div>
                                        <%
                                        include('/includes/footerfunc.jag');
%>


</div>
<!-- /container -->
<%
include('/includes/scripts.jag')
%>

	<script>

		$(document).ready(function(){
        $('#del').toggleClass('active')
		$('#docs').addClass('active')
        });




	</script>
</body>
</html>