Archive for the ‘Ajax & Javascript’ Category

How to order the elements with jQuery (2/2)

In the previous article we saw how the sortable method allows the sorting of a list of items through dragging. We just saw a “visual” implementation though. But if we want the sorting to be lasting, hence it remains the same even if we reload the page, we will have to go the extra mile.
In the practical case, we will extract the items from a table of the database in which we will save the id, the item name and the item order.
The change of order has then to be intercepted and sent by means of an asynchronous call to a file that will take care of updating the database.
As you can see by the example, if you change the order, it will remain unaltered even by reloading the page (unless there is another user that is using the example) since it is saved in the database as it will be illustrated in this article. || Read more »

How to order the elements with jQuery (1/2)

How to order the elements with jQuery (1/2)

In this article we’ll treat the fascinating and always increasingly used the technique of the item ordering in an html document. The classical example could be the management of WordPress widgets. To activate a widget we have to drag it...

5 comments

How and when to use jQuery’s serialize method?

How and when to use jQuery’s serialize method?

In various articles we have written on jQuery, it has always been evident how this framework contributes to the simplification of code development. In this article we will see how knowledge of all these instruments put at our disposal can...

9 comments

How to create chained select with PHP and jQuery?

select

In this article we'll talk about the chaining of  select also called   select cascade. It is a procedure  that we often find on the web and it consists in giving the user the possibility  to find a specific data through...

92 comments

Do you want to implement ajax features but you don’t know how?

Do you want to implement ajax features but you don’t know how?

Ajax is always more and more diffused and common in various websites, at times even when it's not necessary, but after all this happens somehow with everything.  If you are attracted by this technology but you don't know where to...

4 comments

How to use regular expressions in JavaScript?

How to use regular expressions in JavaScript?

After having examined the theoretical basis and syntax of regular expressions, it is important to know how to use this knowledge in productive terms. In fact, although the rules are common, every programming language uses its own routines: in this...

4 comments

The Obscure Art of Drag and Drop: How to Drag and Drop Objects?

The Obscure Art of Drag and Drop: How to Drag and Drop Objects?

Dragging and dropping objects in a web page is a totally fascinating property and surely impressive. Those who are familiar with WordPress administration panel know for example that in order to activate a widget enough dragging it on the sidebar...

4 comments

jQuery – How to Create a News Ticker with just a few JavaScript lines?

jQuery – How to Create a News Ticker with just a few JavaScript lines?

As you already know now, I love to reinvent the wheel ( jQuery always allows me that), and because of that, once more, we'll see how to create something which already exists: a news ticker. Usually the "news ticker" is a...

26 comments

Regular Expressions: Advanced Constructs

Regular Expressions: Advanced Constructs

The "bad" reputation of regular expressions is due in large part to the obscure syntax: there are many rules and abbreviations, some symbols have other meanings depending on their location, some constructs seem incomplete, while they are functioning properly. In...

2 comments

jQuery tips & tricks: how to limit characters inside a textarea

jQuery tips & tricks: how to limit characters inside a textarea

You might have come across a problem trying to limit the maximum number of characters in a text area, since a maxlength attribute doesn't exist for this tag. In this article we will provide you with a jQuery-based solution, one...

24 comments

Do you want to use JSON but don’t know where to start?

Do you want to use JSON but don’t know where to start?

As time passes, and as 2.0 web applications become more popular, AJAX has become leader in the transfer of asynchronous data. Having said that, it has become evident that there's a need for a language which is versatile, easy to...

13 comments

Fun with JavaScript: jQuery and Konami Code

Fun with JavaScript: jQuery and Konami Code

Today we're going to take a small leap back in time to the year 1985, when a Konami developer (Kazuhisa Hashimoto) created the first version of Gradius (a video game for the Nintendo console). During game trials, Kazuhisa realized that...

16 comments

30+ websites with amazing javascript effects

30+ websites with amazing javascript effects

The trend of the web? The use of original Javascript effects, which dynamize our web pages in a creative way. Easy to integrate and easy enough to manage, the javascripts enable interactive websites and with very fascinating animations. Besides, unlike...

15 comments

Wanna learn jQuery but you don’t know where to start from? Alternating functions, variables, first effects

Wanna learn jQuery but you don’t know where to start from? Alternating functions, variables, first effects

In last week’s article we created a simple lamp interrupter. In this lesson we will proceed with the optimization and improvement of this example, illustrating new functionalities of the jQuery framework. Let’s proceed with no delay! (more…)

3 comments

Wanna learn jQuery but don’t know where to start from? – The events

Wanna learn jQuery but don’t know where to start from? – The events

In the first lecture on Jquery we introduced the basic concepts of this framework and we made a simple example which consisted of adding a class to highlight certain sections of the text once the loading of the page ends....

2 comments

You want to learn how to use jQuery but don’t know where to start?

You want to learn how to use jQuery but don’t know where to start?

Considered by a majority of developers nothing more than a hobby until a few years ago, thanks to the Ajax technology, Javascript has been reliving its golden days once again. Thanks to the ever-widening diffusion of this language, a great...

5 comments

Web design elements: form validation with jQuery

Web design elements: form validation with jQuery

In the past lessons, we looked at how to structure a form and the basic choices to be made. However, we overlooked something important: errors. Have you ever filled in a long form and, only after submitting, come to realize...

No comments

Which is the best editor for writing your code? Here’s a list of those most used by web designers

editor

One of the most important tools for a web designer is without a doubt an editor (IDE – Integrated Development Environment) with which to create the code that gives life to your projects. These applications help us to draft code...

6 comments

From HTML to jQuery: how to show/hide boxes in a webpage?

From HTML to jQuery: how to show/hide boxes in a webpage?

Taking as a starting point a reader’s request I thought of providing this example to demonstrate the process of creation of a website’s section, from the HTML structure to the integration of jQuery. In this article we will show you...

No comments