background preloader

Jquery

Facebook Twitter

XDate - A Modern JavaScript Date Library. A Modern JavaScript Date Library XDate is a thin wrapper around JavaScript's native Date object that provides enhanced functionality for parsing, formatting, and manipulating dates.

XDate - A Modern JavaScript Date Library

It implements the same methods as the native Date, so it should seem very familiar. Also, it is non-destructive to the DOM, so it can safely be included in third party libraries without fear of side effects. Size: 7.2k (3.0k gzipped) Version: 0.8.2 Released: Apr 28th, 2017 Constructors new XDate() Creates a new XDate with the current date and time new XDate(xdate) Creates a copy of the given XDate new XDate(nativeDate) Creates a new XDate from a native Date new XDate(milliseconds) Creates a new XDate that is milliseconds since the UTC epoch. FullCalendar - Full-sized Calendar jQuery Plugin. Infinite Scroll Loading Image and Text - Tony Lea.

So, many of you may have heard about the amazing jquery plug-in called ‘Infinite-Scroll’. If you haven’t you need to check it out here. Anyway, when I was trying to incorporate this plug-in to my site, it was very easy; however, I could not for the life of me figure out how come the loading image and loading text I had specified in the jQuery options were not being executed. Well, the reason is that the documentation on the site has not been updated. The Loading functionality is supposed to be passed as a separate array. So, instead of passing this code through the infinite scroll plug-in : You’ll want to add the following instead: And now, your custom image and message text will be displayed You can checkout the original Github post issue here:

How to detect radio box change with jQuery - Tony Lea. I’m constantly finding myself searching Google when I need to find out how to detect when a radio box has been changed using jQuery, and sometimes I have to search down a couple results til I finally find one that works. So, since this may come up again in the future, I have just decided to write a quick post about this topic. Finding out when the radio box has been changed with jQuery is very easy, say you have a form inside your html that looks like this: Now, to detect when that radio box is changed, you can easily call the jQuery ‘change’ event inside your jQuery document ready function: In the above example when the radio box has been changed an alert is displayed.

Now, in order to get the value of the currently selected radio box we can simply save the value in a variable: And, of course this has to be called inside of the jQuery ‘change’ function. And the following is the code for the example above: