jQuery UI Datepicker – Disable specific days

Here is a way to disable specific dates from being selected: var unavailableDates = [“9-5-2011″,”14-5-2011″,”15-5-2011”]; function unavailable(date) { dmy = date.getDate() + “-” + (date.getMonth()+1) + “-” + date.getFullYear(); if ($.inArray(dmy, unavailableDates) < 0) { return [true,””,”Book Now”]; } else { return [false,””,”Booked Out”]; } } $(‘#iDate’).datepicker({ beforeShowDay: unavailable }); Source: jQuery – Datepicker – … Read more

How to display an IFRAME inside a jQuery UI dialog

The problems were: iframe content comes from another domain iframe dimensions need to be adjusted for each video The solution based on omerkirk’s answer involves: Creating an iframe element Creating a dialog with autoOpen: false, width: “auto”, height: “auto” Specifying iframe source, width and height before opening the dialog Here is a rough outline of … Read more

jQuery multiselect drop down menu

Update (2017): The following two libraries have now become the most common drop-down libraries used with Javascript. While they are jQuery-native, they have been customized to work with everything from AngularJS 1.x to having custom CSS for Bootstrap. (Chosen JS, the original answer here, seems to have dropped to #3 in popularity.) Select2: https://select2.github.io/ Selectize: … Read more

How to draw a line between draggable and droppable?

updated (08.Jul.2013) Updated with latest versions of libraries; html refactored using JsRender; updated (29.Sep.2011) Added GIT Repo; cleaned the code; update to latest framework versions; updated (03.Mar.2013) Fixed links with working example; Current example uses: HTML 5 doctype jQuery v.1.10.2 jQuery UI v.1.10.3 Raphael v.2.0.1 JsRender v.1pre35 (optional, used for HTML simplification) Source Source code … Read more