Showing posts with label JQuery. Show all posts
Showing posts with label JQuery. Show all posts

Tuesday, November 5, 2013

Top 5 Popular jQuery Plugins


Author Bio: Danica loves technology and she constantly advises people on the best web hosting platforms for using jQuery as well as a host of other coding libraries. She is an expert at using PHP and hopes to start her own development company in the future.

jQuery is one of the most popular libraries available to webmasters and developers, and a big reason for that is the large number of high quality plugins that are available. These help novice webmasters and developers to create professional looking websites filled with different features, while those with experience can use jQuery to add the finishing touches to what is already an exceptional platform.

That said, one of the worst things for a developer to do online is to overuse plugins, widgets, and various other things that are available in order to enhance the user experience of a website. With that in mind, we have looked at five of the best and most popular jQuery plugins you could use on your website.

Cycle 2

If static images are a big part of your website, then the Cycle 2 jQuery plugin is a great way to take your imagery to the next level and create exciting slideshows on your web pages. What makes this plugin a winner is that it is so easy to use; all you need to do is include the plugin and mark-up to your code, and everything else is done for you. Although this is the perfect plugin for new webmasters or bloggers, it is also loved by those with great knowledge of web development owing to its ability to work within responsive design themes.

FitVids

While many people fret about how having video content on their website will slow down loading times, some struggle to even get video onto their pages at all. Those who want to make video a feature of their site should consider using FitVids, especially if they are embedding video content that is already featured on sites like YouTube.

Even though modern HTML5 coding makes it easy to embed your own videos from your disk or device, it is still worth using a plugin like FitVids so you can be flexible with the video content on your site.

Monday, February 18, 2013

PHP example - Google Recaptcha validation using jquery (AJAX)

In earlier post we have seen JSP example, how to validate Recaptcha using jquery,  Now we will see how to achieve the same in PHP.

To know more about Google recaptcha, click here.

To run php example add recaptcha-php-1.11 in your application. Please see the self explanatory PHP code below.

test.php

JSP example - Google Recaptcha validation using jquery (AJAX)


Below is the example for Google Recaptcha validation using jquery(AJAX).

What is reCAPTCHA?

reCAPTCHA is a free CAPTCHA service that protects your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human; a CAPTCHA is a Completely Automated Public Turing test to tell Computers and Human Apart. reCAPTCHA comes in the form of a widget that you can easily add to your blog, forum, registration form, etc.

To know more about Google recaptcha, please see below links
http://www.google.com/recaptcha
https://developers.google.com/recaptcha/

Please see self explanatory JSP code below. To run below example add recaptcha4j-0.0.7.jar file in your applications classpath.

test.jsp

Tuesday, January 8, 2013

JavaScript - How to get random numbers and random alpha-numeric numbers?


In this article we will see how to generate random numbers and alpha-numeric numbers in JavaScript  We will use JavaScript Math.random function to generate random numbers.

Math.random function returns a floating-point, pseudo-random number in the range [0, 1) that is, from 0 (inclusive) up to but not including 1 (exclusive), which you can then scale to your desired range.

Please see the below function.


1. Get random numbers

//get random numbers
function getRandomNumber() {
var max = 10;
var randomnumber = Math.floor(Math.random()*max)
return randomnumber;
}

2. Get random numbers between minimum and maximum range

//get random numbers between minimum and maximum range
function getRandomNumber() {
var min = 10;
var max = 20;
var randomnumber = Math.floor((Math.random()*(max - min + 1))+min);
return randomnumber;
}


Sunday, September 2, 2012

Java / JSP : Simple image cropping example


In this article we will see how to crop an image in Java. You are in this page then u might surely know what exactly the Image cropping is, it is nothing but removal of the outer parts of an image  to improve framing, to change aspect ratio etc.

Image cropping can be implemented easily using Java. First lets see the basic example of image cropping. In the below code we have used getSubimage() function of BufferedImage to achive image cropping feature. No need to add any Jar file directly you can run below code and see the output.

Please see the self explanatory java code below.