5 <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6 <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
8 <title>AutoFill example - Basic initialisation</title>
9 <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
10 <link rel="stylesheet" type="text/css" href="../css/dataTables.autoFill.css">
11 <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
12 <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
13 <style type="text/css" class="init">
16 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
17 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
18 <script type="text/javascript" language="javascript" src="../js/dataTables.autoFill.js"></script>
19 <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
20 <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
21 <script type="text/javascript" language="javascript" class="init">
24 $(document).ready(function() {
25 var table = $('#example').DataTable();
26 new $.fn.dataTable.AutoFill( table );
33 <body class="dt-example">
34 <div class="container">
36 <h1>AutoFill example <span>Basic initialisation</span></h1>
39 <p>AutoFill gives an Excel like option to a DataTable to click and drag over multiple cells, filling in
40 information over the selected cells and incrementing numbers as needed.</p>
42 <p>AutoFill is initialised using the <code>$.fn.dataTable.AutoFill</code> function as shown in the
43 example below. It requires one parameter, the DataTable instance that AutoFill is to operate on, and
44 optionally a second configuration parameter, which is shown in the other AutoFill examples.</p>
47 <table id="example" class="display" cellspacing="0" width="100%">
73 <td>System Architect</td>
80 <td>Garrett Winters</td>
89 <td>Junior Technical Author</td>
90 <td>San Francisco</td>
97 <td>Senior Javascript Developer</td>
112 <td>Brielle Williamson</td>
113 <td>Integration Specialist</td>
120 <td>Herrod Chandler</td>
121 <td>Sales Assistant</td>
122 <td>San Francisco</td>
128 <td>Rhona Davidson</td>
129 <td>Integration Specialist</td>
136 <td>Colleen Hurst</td>
137 <td>Javascript Developer</td>
138 <td>San Francisco</td>
145 <td>Software Engineer</td>
153 <td>Office Manager</td>
161 <td>Support Lead</td>
168 <td>Charde Marshall</td>
169 <td>Regional Director</td>
170 <td>San Francisco</td>
176 <td>Haley Kennedy</td>
177 <td>Senior Marketing Designer</td>
184 <td>Tatyana Fitzpatrick</td>
185 <td>Regional Director</td>
192 <td>Michael Silva</td>
193 <td>Marketing Designer</td>
201 <td>Chief Financial Officer (CFO)</td>
208 <td>Gloria Little</td>
209 <td>Systems Administrator</td>
216 <td>Bradley Greer</td>
217 <td>Software Engineer</td>
225 <td>Personnel Lead</td>
232 <td>Jenette Caldwell</td>
233 <td>Development Lead</td>
241 <td>Chief Marketing Officer (CMO)</td>
248 <td>Caesar Vance</td>
249 <td>Pre-Sales Support</td>
256 <td>Doris Wilder</td>
257 <td>Sales Assistant</td>
264 <td>Angelica Ramos</td>
265 <td>Chief Executive Officer (CEO)</td>
280 <td>Jennifer Chang</td>
281 <td>Regional Director</td>
288 <td>Brenden Wagner</td>
289 <td>Software Engineer</td>
290 <td>San Francisco</td>
297 <td>Chief Operating Officer (COO)</td>
298 <td>San Francisco</td>
305 <td>Regional Marketing</td>
312 <td>Michelle House</td>
313 <td>Integration Specialist</td>
328 <td>Prescott Bartlett</td>
329 <td>Technical Author</td>
336 <td>Gavin Cortez</td>
338 <td>San Francisco</td>
344 <td>Martena Mccray</td>
345 <td>Post-Sales support</td>
352 <td>Unity Butler</td>
353 <td>Marketing Designer</td>
354 <td>San Francisco</td>
360 <td>Howard Hatfield</td>
361 <td>Office Manager</td>
362 <td>San Francisco</td>
368 <td>Hope Fuentes</td>
370 <td>San Francisco</td>
376 <td>Vivian Harrell</td>
377 <td>Financial Controller</td>
378 <td>San Francisco</td>
384 <td>Timothy Mooney</td>
385 <td>Office Manager</td>
392 <td>Jackson Bradshaw</td>
400 <td>Olivia Liang</td>
401 <td>Support Engineer</td>
409 <td>Software Engineer</td>
416 <td>Sakura Yamamoto</td>
417 <td>Support Engineer</td>
432 <td>Finn Camacho</td>
433 <td>Support Engineer</td>
434 <td>San Francisco</td>
440 <td>Serge Baldwin</td>
441 <td>Data Coordinator</td>
448 <td>Zenaida Frank</td>
449 <td>Software Engineer</td>
456 <td>Zorita Serrano</td>
457 <td>Software Engineer</td>
458 <td>San Francisco</td>
464 <td>Jennifer Acosta</td>
465 <td>Junior Javascript Developer</td>
472 <td>Cara Stevens</td>
473 <td>Sales Assistant</td>
480 <td>Hermione Butler</td>
481 <td>Regional Director</td>
489 <td>Systems Administrator</td>
496 <td>Jonas Alexander</td>
498 <td>San Francisco</td>
505 <td>Regional Director</td>
512 <td>Michael Bruce</td>
513 <td>Javascript Developer</td>
520 <td>Donna Snider</td>
521 <td>Customer Support</td>
531 <li class="active">Javascript</li>
535 <li>Server-side script</li>
540 <p>The Javascript shown below is used to initialise the table shown in this
541 example:</p><code class="multiline brush: js;">$(document).ready(function() {
542 var table = $('#example').DataTable();
543 new $.fn.dataTable.AutoFill( table );
546 <p>In addition to the above code, the following Javascript library files are loaded for use in this
550 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
552 "../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
553 <li><a href="../js/dataTables.autoFill.js">../js/dataTables.autoFill.js</a></li>
558 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by
564 <p>This example uses a little bit of additional CSS beyond what is loaded from the library
565 files (below), in order to correctly display the table. The additional CSS used is shown
566 below:</p><code class="multiline brush: js;"></code>
569 <p>The following CSS library files are loaded for use in this example to provide the styling of the
574 "../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
575 <li><a href="../css/dataTables.autoFill.css">../css/dataTables.autoFill.css</a></li>
580 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
581 will update automatically as any additional data is loaded.</p>
585 <p>The script used to perform the server-side processing for this table is shown below. Please note
586 that this is just an example script using PHP. Server-side processing scripts can be written in any
587 language, using <a href="//datatables.net/manual/server-side">the protocol described in the
588 DataTables documentation</a>.</p>
596 <div class="gradient"></div>
599 <h2>Other examples</h2>
602 <div class="toc-group">
603 <h3><a href="./index.html">Examples</a></h3>
604 <ul class="toc active">
605 <li class="active"><a href="./simple.html">Basic initialisation</a></li>
606 <li><a href="./columns.html">Column options</a></li>
607 <li><a href="./scrolling.html">Scrolling DataTable</a></li>
608 <li><a href="./fill-both.html">Horizontal and vertical fill</a></li>
609 <li><a href="./fill-horizontal.html">Horizontal fill</a></li>
610 <li><a href="./complete-callback.html">Complete callback</a></li>
611 <li><a href="./step-callback.html">Step callback</a></li>
616 <div class="epilogue">
617 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
618 information about its API properties and methods.<br>
619 Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
620 <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
623 <p class="copyright">DataTables designed and created by <a href=
624 "http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2014<br>
625 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>