Skip to content

{ Category Archives } jQuery

Getting flexcal to Work With the Theme Switcher

Just checking. No reason it shouldn't work with the jQuery UI themeswitcher. The slot machine animation has a white background, which looks off with some themes. The text color for the dates unfortunately is (by the CSS specificity rules) overridden by the blog's text color, so dark themes are near unreadable. Slot Machine Transition Cycle [...]

flexcal Slot Machine

Modified 2009-05-19 to use a simpler technique to make it inline. OK, one more flexcal transition, inspired by Stefan Petre's jQuery slot machine. I should have been balancing my checkbook, but my kids thought this was cooler. $('#slots').flexcal({ transition: function(o){ var pane = o.elements.eq(1-o.currSlide), origTable = pane.find('table'); o.elements.eq(o.currSlide).css({zIndex: 1}).animate({top: -o.$cont.height()}, 'normal', 'easeInBack'); pane.css({top: o.$cont.height(), zIndex: [...]

flexcal and cycle

Updated for jQuery UI 1.8 and cycle 2.81, but it doesn't work so well anymore The alert reader will notice that the parameters for the transition animation for my flexcal widget are the same as that used by Mike Alsup's cycle plugin. My hope was that I could use { transition: $.fn.cycle.next } and be [...]

Improving jQuery UI widget getters/setters

Right now UI widgets need to explicitly declare "getter" functions (methods that return information about the widget rather than manipulate it) with $.ui.widget.getter = 'gettermethod1 gettermethod2'. The reason is that most jQuery plugins are chainable: $(selector).widget('method').css('color','blue') executes method on each element matched, then css('color','blue') on each element. Some plugins and some uses of plugins instead [...]

New jQuery Widget: flexcal

Updated 2011-10-30 to version 2.1, with some bug fixes Just what the world needs—another date picker Download the code.

New Widgets: googleSearch and ajaxpopup

Updated 2011-02-23 to allow for destroying the widget correctly and the new Google Custom Search API I made a jQuery UI widget (a subclass of textpopup) that hijaxes a Google search form to show the results in a popup box rather than on a new page. Google AJAX search returns only the top four results, [...]

jQuery UI 1.7

Finally, jQuery UI 1.6 final is out, renamed 1.7, and it's on google ajax libraries, so it's minimized (45K for the whole thing; .27 sec to download for me, which is nothing, especially if you're loading at the end of your code so the user is busy reading the content of your site). The contributors [...]

$.later: binding jQuery plugin methods

I don't like writing function(){$(this).doStuff()} for callbacks and wanted some more elegant way of binding objects to functions. I could always use something like Prototype's bind, but I don't want to modify built-in types (because John Resig says not to) and I generally just want to bind plugins to jQuery objects, so it ought to [...]

New plugin scrollIntoView

One thing that bugged me about my textpopup plugin was that the popup would not necessarily be visible on screen. datepicker moves the widget to a visible spot on screen, which I find very disconcerting. Ariel Flesler's scrollTo was my inspiration, but it scrolls an element so that its top left corner is at the [...]

Upgrading to jQuery UI 1.6

I've updated my widgets tutorials to use jQuery UI 1.6, pulling the rc5 release off the svn site and turning them into pages rather than posts, since they seem to be so popular. See the widget tutorial and the extending widgets page. Now all I need is for the UI team to officially release 1.6 [...]