jQuery Topics

JavaScript Object Literal Array Examples

Is it possible to declare arrays in JavaScript object literal notation? Example 1 – this works with arrays Declaration: Storage of data: Example 2 – this works with objects Declaration: Storage of data: Please share your thoughts on this in comments.

Read more

Basic JavaScript Regular Expression Example

I have jotted a quick post on a Basic JavaScript Regular Expression Example to give beginners out there a taste of the power of using Regex in jQuery/JavaScript. Example: Want to extract the price, could be an integer or float from a dataset of prices. Dataset: Regex pattern: You can use a Regular Expression tool [...]

Read more

JavaScript/jQuery Zip/File/Compressor Plugins

A collection of JavaScript/jQuery Zip/File/Compressor plugins that allows you to minify your JS code and compress your JS files ready for zip files. Enjoy! Related Posts: 10 Online Tools to Help Optimize and Format CSS 10 Core/Client/Server JavaScript Things JSMini Online JavaScript & jQuery Minifier Tool. Minify your JS code, free and simple to use, [...]

Read more

JavaScript and jQuery PDF Viewer Plugins

Today’s post is about some JavaScript and jQuery PDF related plugins we found on the Internet that allows you to embed and view PDF files. Enjoy! Related Posts: 10 jQuery Pagination Plugins http://www.jquery4u.com/plugins/jquery-lightbox-colorbox-fancybox-thickbox/ pdf.js PDF Reader in JavaScript. Source Demo PDFObject Embeds PDF files into HTML documents. Source Demo jsPDF It is an open-source library [...]

Read more

Object Literal Array Example

Object Literal Array Example. Comments Welcome.

Read more

10 Core/Client/Server JavaScript Things

JavaScript language has three components and they are called: Core, Client-side and Server-side. Today we are sharing you a list of Core JavaScript Framework things you might not have seen yet? Enjoy! Related Posts: 10 JavaScript Web UI Libraries, Frameworks and Toolkits 10 Alternative and Capable JavaScript Frameworks 1. Kalendae: A framework agnostic JavaScript date [...]

Read more

10 JavaScript and jQuery Templates Engines

A template is a way of specifying a function that produces a string in the output language (either in string or AST form) from a bundle of data using a syntax that is reminiscent of the output produced. Today we’ve come up with 10 JavaScript and jQuery Template Engines that you might find interesting to [...]

Read more

10 JavaScript Form Plugins You Must Have

In this post, we have collected 10 useful form plugins that use some awesome jQuery or JavaScript magic to enhance the existing form elements to help you create a better and user friendlier web forms. Enjoy. Related Posts: Basic jQuery Form Validation Example (2mins) jQuery Forms > 30 Examples and Plugins 1. Chosen It is [...]

Read more

2 Options to Show All JavaScript on Page

Here are 2 options to quickly view all the JavaScript used on a web page. Could come in handy when trying to find event handlers or specific code without searching through individual files. Option 1: Bookmarklet – A bookmarklet (drag it to your bookmarks) by Ichiro Hiroshi to see all JavaScript’s used on the web [...]

Read more

Dynamically Load jQuery Library Using Plain JavaScript

This is how you can load the jQuery library using plain JavaScript. As the load takes place asynchronously so i’ve included a callback version too so you know when the script inserted has completed and you can start using jQuery! I previously posted about inserting scripts into secure pages so there are more options for [...]

Read more

10 jQuery Plugins that Cost Money

The jQuery Slider can play a very important role when it comes to grabbing attention, displaying images & saving space on your website. It enhances the website UI by providing a convenient way to display images/videos/media and important information which the user can slide through. Today we are sharing you our collection of 10 jQuery [...]

Read more

10 Funny and Entertaining JavaScript Effects

It’s Friday! Let’s have some fun, shall we? In this post, we have collected some funny and entertaining things that JavaScript can do. With JavaScript, you can find some little joys and make many funny things that you may not have realized. So check this out. Enjoy lol!

Related posts:

1. Pictures flying as a snake around the mouse pointer


Make pictures flying like snake around your mouse pointer just copy and paste the JavaScript code into the address bar of any browser then press Enter.
Pictures-flying-as-a-snake-around-the-mouse-pointer.jpg
Source

2. Transform the web page into the editable mode


Make funny things with this simple JavaScript, such as; faking the screen capture of some proof, faking some hot news for April Fool’s Day and more, quickly.
Transform-the-web-page-into-the-editable-mode.jpg
Source

3. You must love me


Give your lover the link of this effect, then ask her to answer the question “Do you love (marry) me?” and see if she can say no! (I tried the demo more than 10x and couldn’t help myself from laughing!)
You-must-love-me.jpg
demo
Source

4. Joking Error Message Alert box


Like the above funny JavaScript but this script uses the picture to make the choices; maybe from the idea of this joke plus some different pictures, you can make more funny jokes.
Joking-Error-Message-Alert-box.jpg
Source

5. The text based Cheerleader Animation


No need to say more about it, let try it out by yourself.
The-text-based-Cheerleader-Animation.jpg
Source

6. Faking Textarea on Typing


This funny script made to prove that you’re too trusting of people. Don’t believe me? Just check it by yourself.
Faking-Textarea-on-Typing.jpg
demo
Source

7. Unclosable Window


Your mind should be ready before run this script, maybe it will not be funny; and you have to enable popup for this darn script! (I got a little headache on this one, and I thought I wouldn’t spare you)
Unclosable-Window.jpg
demo
Source

8. Shake or Buzz the browser window (browser screen) with JavaScript


While chatting with friends do you Buzz them or get a Buzz. It will shake your screen. In this article we are going to shake browsers window.
Shake-or-Buzz-the-browser-window-browser-screen-with-JavaScript.jpg
Source

9. Love Tester


Now you can check the love compatibility between two people with the help of this small JavaScript. (I and this script are not responsible for any broken relationship you tried. lol)
Love-Tester.jpg
demo
Source

10. Fake Alerts


This so simple. All you have to do is to copy and paste the given JavaScript code into website of choice. Don`t forget to change the text!
Fake-Alerts.jpg
Source

Read more

Using jQuery .exec() and .compile() Regex

If your working with JavaScript regular expressions a lot (like me) this is worth knowing. For those of you that don’t know the exec() method simply tests for a match in a string and returns the matched text if it finds a match, otherwise it returns null.

/* match just the href of js includes */
var jsSrcRegex = /src=\"(.+?)\"/igm; 

/* html for js include */
var html = '<script type="text/javascript" src="/jquery-1.6.1.min.js"></script>';

console.log(jsSrcRegex.exec(html));

console.log(html);
console.log(jsSrcRegex);

console.log(jsSrcRegex.exec(html));

regex-compile1

No results eh?! Interesting enough if we then add an extra console.log and… results are back! hmm…

regex-compile2

regex.compile() fixes the problem

Now, if you use .compile() on the regex it works!

/* match just the href of js includes */
var jsSrcRegex = /src=\"(.+?)\"/igm; 

/* html for js include */
var html = '<script type="text/javascript" src="/jquery-1.6.1.min.js"></script>';

console.log(jsSrcRegex.exec(html));

/* recompile the regex */
jsSrcRegex.compile(jsSrcRegex);

console.log(html);
console.log(jsSrcRegex);

console.log(jsSrcRegex.exec(html));

As you can see the array of results is found once we recompiled.

regex-compile3

It basically compiles/recompiles the regex during code execution, so generally if you change the regex you should run .compile(). This also applies to using .exec() inside a loop just include .compile() before it. Useful to know.

Read more

10 Great 3D Effects using jQuery

3D is now a commodity with 3D TV’s being all the rage and the latest cinema flicks are nearly always in 3D. With this in mind we can use jQuery to bring amazing 3D effects to our websites! From galleries to menus & text, 3D can take the user experience to the next level. Here are 10 jQuery 3D effects/plugins. (8. and 10. are pretty good!) Enjoy!

Related posts:

1. jQuery TagCanvas


A JavaScript class which will draw and animate a HTML5 canvas based tag cloud. In general tag clouds use the font size of the tag links to highlight their frequency or popularity, so TagCanvas uses the size of the tag text to determine the weight of each tag.
jQuery-TagCanvas.jpg
Source

2. jQuery 3D Label Effects


A jQuery plugin that applies highlight and shadow effects to text in a control so as to create a 3d effect.
jQuery-3D-Label-Effects.jpg
Source

3. TextDepth: 3D-text jQuery Plugin


Allows creating awesome 3D text effect with jQuery. Enjoy 3D effect in all your text with this easy to use plugin. It comes with the following options to customize the 3D Effect: Depth, Wrapper, Shade_Color, Gradient.
TextDepth-3D-text-jQuery-Plugin.jpg
Source

4. jQuery Three Dee


A plugin for the jQuery JavaScript Framework, which converts text into 3D text that can be viewed with simple red/blue 3D glasses. The plugin uses CSS3, with a fall-back for older browsers to create the 3D effect.
jQuery-Three-Dee.jpg
Source

5. 3D Sphere Using jQuery


Ever wanted your tag cloud to resemble a ball? Of course you did. This tutorial will walk you through how to create a Sphere in jQuery.
3D-Sphere-Using-jQuery.jpg
Demo
Source

6. jQuery Smart3D


This plugin provides a lot of options to customize the behavior. It provides a set of interesting effects that can be used to design interactive websites. Use them on site headers to create appealing websites.
jQuery-Smart3D.jpg
Source

7. jQuery 3D ObjectVR


This jQuery libraray helps you create attractive and lovely 3D shapes. Change the perspective, tilt, rotate and play with the shapes using the jQuery 3D ObjectVR plugin.
jQuery-3D-ObjectVR.jpg
Source

8. Cloud Carousel – A 3d Carousel in JavaScript


There are some attractive Adobe Flash based solutions for this type of UI component, and while JavaScript versions exist (see this and this), the commercial Flash products tend to have better aesthetics and polish. This is cool!
Cloud-Carousel-–-A-3d-Carousel-in-JavaScript.jpg
Source

9. Tagosphere


A 3d animated tag cloud generated from an array. You can easily customize it by tweaking the eide range of options provided by this plugin.
Tagosphere.jpg
Source

10. 3d tag cloud


This is a jQuery plugin to create a 3d tag cloud from an unordered list. Create tags that rotate with a 3d effect usig jQuery. This plugin provides a lot of options to customize the looks of the amazing jQuery 3d tag cloud. Scroll in and out with the mouse wheel!
3d-tag-cloud.jpg
Source

Read more

10 JavaScript Dialog Box/Window Tutorials

We all know that JavaScript adds functionality to web pages, performs useful tasks, validate data and much more. Well you should also know that JavaScript and jQuery can be used to create some awesome dialog windows. Ditch the alert windows … here are some tutorials to get you started! Enjoy!

Here are some previous posts about dialog boxes:

1. Controlling Windows with JavaScript


Learn how to control your windows using JavaScript.
Controlling-Windows-with-JavaScript.jpg
Source

2. Loading two frames with one link


This tutorial shows you how to load two frames with one link using JavaScript.
Loading-two-frames-with-one-link.jpg
Source

3. JavaScript Opacity Animation


Creates an opacity animation with a control on your website. At the end of the tutorial you will be able to dim a control in and out of view using JavaScript.
JavaScript-Opacity-Animation.jpg
Source

4. Window Spawning and Remotes


This article discusses different ways to launch new windows with HTML and JavaScript.
Window-Spawning-and-Remotes.jpg
Source

5. Accept Focus until Closed


A small snippet that allows you to keep a window ‘on top’ of all others until closed.
Accept-Focus-until-Closed.jpg
Source

6. JavaScript Popup Window


Creating a popup window is maybe one of the most often used JavaScript use case. However a traditional popup window is not the best choice nowadays as it is almost always blocked by browsers. In this tutorial I will learn how to create a layer based popup window with JavaScript.
JavaScript-Popup-Window.jpg
Source

7. Custom LightWindow with jQuery


Learn how to create your own LightWindow from scratch.
Custom-LightWindow-with-jQuery.jpg
Source

8. Get and modify Iframe content


In this tutorial it is present the mode to get and modify content in an IFRAME, from the main page, using JavaScript.
Get-and-modify-Iframe-content.jpg
Source

9. JavaScript Bouncing Marquee text scroll at Status Bar of web browser


JavaScript Bouncing Marquee text scroll at Status Bar of web browser With the help of JavaScript we can add our favorite message with Bouncing Marquee text scroll effect.
JavaScript-Bouncing-Marquee-text-scroll-at-Status-Bar-of-web-browser.jpg
Source

10. Browser Window OffSets (scroll compensator)


These two handy functions are useful when you are trying to keep a dynamic element in view or find if the user has scrolled the page by returning the number of pixels the page has been scrolled.
Browser-Window-OffSets-scroll-compensator.jpg
Source

Read more

jQuery Resources

Learn more about jQuery

jQuery News & Links

Live edit functionality in web pages and web apps is all the rage these days but never fun to implement. ...

I only just found out that the jQuery validation plugins has a validation rule called “remote” which can be used ...

jQuery function to check if horizontal scroll is present – hasHScrollBar() – (or vertical check below also, util function to ...

jQuery function to Set any DOM Element to Top View (bring to front) using CSS Z-Index property.

Is it possible to declare arrays in JavaScript object literal notation? Example 1 – this works with arrays Declaration: Storage ...

To get the a variables type using jQuery there is a jQuery function called .type() which returns “array”, “string”, “number”, ...

In this post you can find tutorials which explain step by step different API use cases with jQuery like Google ...

For valuable work on creation of sites you need a good comfortable editor necessarily. There are many requiring paid products ...

Today we are sharing with you a collection of awesome jQuery Camera Photo plugins. They offer a range of image ...

Back in the day, if you saw something that was animated on a website it was automatically assumed to be ...

In this post, we have compiled a list of 10 jQuery HTML5 Audio players available today, most allow native audio ...

jQuery Mobile is a powerful framework for making mobile web applications. But can we use it to convert existing desktop ...

I have jotted a quick post on a Basic JavaScript Regular Expression Example to give beginners out there a taste ...

In April 2012′s edition of Interestingly Random JavaScript, jQuery and Web Development we bring you some very cool stuff such ...

In this post we are sharing you a roundup of 10 really jQuery plugins as of today. Pretty cool plugins ...

As always expected from the jQuery community, the compilation we have for you today are some good and impressive recently ...

A collection of jQuery PNG/JPEG/GIF plugins that enables image animation, cartoon-like background, etc… let them help you design displays for ...

A collection of JavaScript/jQuery Zip/File/Compressor plugins that allows you to minify your JS code and compress your JS files ready ...

Quick jQuery code snippet on how to keep an element in view. For demo scroll down on any page on ...

Here is what I think is the best and most reliable way to load jQuery library and jQuery UI Libraries. ...

More Links & News

Community Resources

Use jQuery and the Google Maps API to create your own map application.

Super cool and easy way to get stylish tooltips with jQuery.

The right way to include the jQuery library in WordPress.

Share a resource