Monthly Archives: May 2014

jQuery Mobile .slider() conflicts with jQuery-UI .slider()

I spent a long time trying to figure this one out.

I was trying to get jQM’s slider() to work, but the behavior was very inconsistent. On some pages, it would work. On others, not so much.

I traced it down to the inclusion of jquery-ui-1.10.4. Apparently, jquery-ui contains a .slider() function and so does jQM.

Others have reported it here with solutions.

You can hack your js libraries as described, or there is probably a easier and more efficient way.

Instead of downloading the full jquery-ui package, use the custom downloader here. Make sure to uncheck the slider widget.

Pretty simple when it’s explain that way, huh?

Tagged , , ,

Sublime Text 3: goto function

This is for anyone using Sublime Text. I have a licensed version, but you can actually use it for free (if you don’t mind a periodic reminder to register). [Endorsement warning…] I find it to be the best light-weight editor I’ve ever used.

Sublime Text 3 is still in beta, but it introduces a very powerful Eclipse-like feature, that allows you to “jump to” a function. I believe you can do something like that within a file in Sublime Text v2, but with the project view in v3, you can do it across files. It also seems to recognize both global functions as well as inherited functions if you’re doing OOP javascript.

In v2, you can take advantage of within-file-goto-function by pressing [ctrl+r].

In v3, set up a project file, set cursor over a function and press F12.
You can also create a key binding so that you can hold ctrl and click with the mouse. Here are instructions for that:

Tagged ,