jQuery (as of version 1.4) provides the
delay()
method to allow web developers to create a certain delay between animations and effects. This method accepts as its sole parameter a time value expressed in milliseconds. Its basic usage is $(element).effect1().delay(time).effect2()
. This means that the execution of the second jQuery's effect is delayed by a certain time value defined in the delay()
method. In this post I'm going to show you a practical example of how we can make this method work together with JavaScript intervals.
JavaScript: high-level programming language
After an email from Boris Zbarsky (Mozilla) of some months ago, I had to reconsider my personal knowledge of programming language levels. Actually, JavaScript is an higher-level programming language than C or C++, which are considered to be lower-level programming languages. There are many papers and articles available on the web that explain the existing differences between programming languages. As you know, being object-oriented is considered to be of an higher level, as explained in this lesson that states:
jQuery: $.unique() and text filtering
$.unique()
is a jQuery utility function that returns an array without any duplicated value. This utility turns out to be very useful with simple arrays, but I think that its full potential is expressed in text filtering. Consider for example a text paragraph which contains the following text: