Tag Archives: jquery

Drag and drop on mobile devices

Drag and drop on mobile devices I had a problem in the past with a draggable and droppable calendar with jQuery and ajax. When you add drag and drop to a web page using JavaScript, such as jQuery UI draggable and droppable, you obtain a problem. The dragging and dropping are intercepted by the phone

How to select all anchors with display block jquery

snippets

How to select all anchors with display block jquery Very often or not, you need to select all the elements from within the DOM, that have their display property set to “block”. Solution

Filter function from jQuery to the rescue. Description: Reduce the set of matched elements to those that match the selector or pass

Disable jqueryui calendar days EXCEPT the mondays of every week

datepicker

Disable jqueryui calendar days EXCEPT the mondays of every week Let’s say you want the user to be able to see all days from within the month, but to be able to select only the mondays of every week.

Here is a DEMO. You can disable all “Sundays” by switching from “day == 1”

How to redirect URL in Javascript or jQuery

snippets

How to redirect URL in Javascript or jQuery I will present some ways to redirect the user to another page from the client side using only plain javascript. 1) Using window.location.href you obtain a similar behavior  as an HTTP redirect

2) Using window.location.replace

window.location.href VS window.location.replace It is better than using window.location.href, because replace() does not put

Change value of selectbox in Zurb Foundation via JavaScript

snippets

Change value of selectbox in Zurb Foundation via JavaScript Some of us tried to change or will have to change via javascript a select-box that is generated from the custom forms of Zurb Foundation  framework. You noticed or you will notice that it is not as simple as changing a default html select-box. Why ?

jQuery DOM manipulation methods

jquery_logo

jQuery DOM manipulation methods In today’s tutorial we will learn how to manipulate DOM elements. We can add elements one after another, replace one element with another one, get properties such as width or height or remove completely elements from the DOM. A few of these methods — such as .attr(), .html(), and .val() — also act as “getters”,

jQuery css methods

jquery_logo

The jQuery library supports almost all of the selectors included in CSS 1, 2 and 3. When using jQuery, the developers can built websites without carring too much about the browser, because jQuery supports also older versions of Internet Explorer (Be careful, because jQuery 2.0 doesn’t support anymore IE 6, 7 or 8.  This can

jQuery DOM Attributes tutorial

jquery_logo

jQuery DOM Attributes In the previous chapters we talked about jquery selectors and we learned that they are coming from css world. We selected elements that were available in the DOM that can be manipulated in all kinds of ways. In this tutorial we will go further and we will talk about DOM attributes. We can manipulate

jQuery Selectors tutorial

jquery_logo

jQuery selectors As I promised, I will write a series of jquery tutorials starting from beginner to advanced, so the first episode of these series will be about jquery selectors. What are jquery selectors ? jQuery selectors are one of the most important aspects of the jQuery library. These selectors use familiar CSS syntax to

JSONP cross-domain ajax call with jquery

javascript

JSONP cross-domain ajax call with jquery This was killing me back in the past. Imagine the following situation. You are on domain abc.com, and you want to make a request to domain xyz.com to get some data or whatever. To do so, you need to cross domain boundaries, which is a DO-NOT in the world

Request an article ←