Let’s learn all about what MVVM is through practical examples.
(more…)
Category: jQuery
-
MVVM Pattern – Model View View Model
-
Add Function to Prototype with Javascript
In some of my more recent posts about How to compare arrays in Javascript and Format Numbers as Currency with Javascript I have been enjoying adding them as extension methods to simplify their usage.
Honestly, I’ve always been afraid to do it because it seems “hard”. Now that I’ve done it once though, it is now becoming second nature. I really can’t believe I haven’t done this before because I absolutely love adding string extensions when I developer with C#.
Let’s take a look at some code to add a function with prototype using Javascript. In this first example I will add it to the Javascript Array Prototype:
-
jQuery Datepicker with a Knockout js custom data binding
Whether you are using the Bootstrap datepicker with a JavaScript array or the jQuery datepicker, they both use the same underlying JavaScript library. So with today’s example, let’s explore implementing the jQuery library with an added bonus of creating a Knockout.js custom binding.
The end goal of this custom data bind jQuery tutorial is to create a form input field data bound not to the standard value binding, but instead to the custom one appropriately named: datepicker.
-
Full screen/background video from YouTube using jQuery
I was searching the web for some neat ideas and I came across this intriguing jQuery plugin that allows you to embed a YouTube video on your website. No, not the standard player, but instead the video is your background. Similar to how you would use an image or color, the YouTube video plays automatically in full screen as the background of your website; here is a demo of the plugin.
-
Checking if an element exists with jQuery
You want to do some conditional processing depending on if an item or items exist in your DOM (Document Object Model). By default, jQuery doesn’t have a function that performs this; however, there is a very simple way to extend jQuery to do so.