Category: Kanban
-
WordPress and jQuery
Add this code to the header.php file in the theme. Add this line before wp_head(): wp_enqueue_script(“jquery”); Then you can write a script (inside script tags) – somewhat like this: var $j = jQuery.noConflict(); // using j as selector to avoid conflicts $j(function(){ $j(“#respond”).hide(); // hide comment field }); Based on this tutorial by Chris Coyier.
-
Research save sortable
<ul id="sortable"> <li id="1">elem 1</li> <li id="2">elem 2</li> <li id="3">elem 3</li> <li id="4">elem 4</li> </ul> $(document).ready(function(){ $('#sortable').sortable({ update: function(event, ui) { var newOrder = $(this).sortable('toArray').toString(); $.get('saveSortable.php', {order:newOrder}); } }); }); Kilde: http://stackoverflow.com/questions/7097168/save-jquery-ui-sortable-positions-to-db
-
Stien til jQuery i WordPress
/wp-includes/js/jquery Mappen indeholder disse filer: jquery.color.min.js jquery.form.js jquery.form.min.js jquery.hotkeys.js jquery.hotkeys.min.js jquery.js jquery.masonry.min.js jquery.query.js jquery.schedule.js jquery.serialize-object.js jquery.table-hotkeys.js jquery.table-hotkeys.min.js jquery.ui.touch-punch.js suggest.js suggest.min.js ui (mappe) Plugins / Templates kan mao. anvende jQuery. Ui mappen indeholder som navnet antyder en række ui-filer: knapper, datepicker etc. etc. En række bloggere advarer mod at bygge jQuery ind i et plugin eller…