How do I pre-populate a jQuery Datepicker textbox with today’s date?

I have a very simple jQuery Datepicker calendar: $(document).ready(function(){ $(“#date_pretty”).datepicker({ }); }); and of course in the HTML… <input type=”text” size=”10″ value=”” id=”date_pretty”/> Today’s date is nicely highlighted for the user when they bring up the calendar, but how do I get jQuery to pre-populate the textbox itself with today’s date on page load, without … Read more

Enqueuing jQuery in plug-ins

I want to use jQuery in a plugin. In functions.php of the theme I’m using, I found: if(!is_admin()) { wp_deregister_script(‘jquery’); wp_register_script(‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js’); As I understand it, this loads jQuery and I’m ready to go. All I have to do is add this to my plugin’s javascript file: jQuery(document).ready(function($) { //put jquery code here }) A) … Read more

using wp_enqueue_script to attach jquery-ui

I am trying to load jquery-ui using wp_enqueue_script. I can check that jquery is loaded. jquery-ui is registered i.e. output of var_dump( wp_script_is( ‘jquery-ui-tabs’, ‘registered’ ) ); is bool(true) which indicates it is registered but it does not get included to the page. I am using wordpress version 3.3.1 What is going wrong? I am … Read more

possible to make sections in theme customizer sortable and saveable at publish button clicked?

We do have kirki(a theme customizer toolkit) sortable field. But i want to apply the same logic on the sections itself instead of creating another section with sortable fields. I’m using options instead of theme mods, just for better visualization right now. The things i tried so far: in functions.php I have this code below … Read more

jQuery UI Dialog with ASP.NET button postback

I have a jQuery UI Dialog working great on my ASP.NET page: jQuery(function() { jQuery(“#dialog”).dialog({ draggable: true, resizable: true, show: ‘Transfer’, hide: ‘Transfer’, width: 320, autoOpen: false, minHeight: 10, minwidth: 10 }); }); jQuery(document).ready(function() { jQuery(“#button_id”).click(function(e) { jQuery(‘#dialog’).dialog(‘option’, ‘position’, [e.pageX + 10, e.pageY + 10]); jQuery(‘#dialog’).dialog(‘open’); }); }); My div: <div id=”dialog” style=”text-align: left;display: none;”> … Read more

How to include jquery-ui library in WordPress?

I’m trying to load the jQuery UI library into a WordPress plugin using this enqueue statement: wp_enqueue_script(‘jquery’); wp_enqueue_script(‘jquery-ui-core’); The jQuery library loads fine, but the ui-core is MIA. The only way I can get ui-core functions to fire is to load the library with a static include like this: <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js”></script> What am I … Read more

No Styling for the datepicker in WordPress admin

I’m developing a plugin for WordPress and I need a datepicker. So I enqueue the jquery and jquery-ui wp_enqueue_script(‘jquery’); wp_enqueue_script(‘jquery-ui-datepicker’); and called the datepicker jQuery(document).ready(function($){ $(‘#date’).datepicker({}); }); It worked pretty well, however my datepicker has no style at all. Anyone knows how to fix that? 1 Answer 1 Here ya go … try this: /* … Read more