Skip to main content

Posts

Showing posts from November, 2013

JQuery progressbar example

<!DOCTYPEhtml> <html> <head>  <meta charset="utf-8">  <title>jQuery Progressbar</title>  <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">  <script src="../../jquery-1.9.1.js"></script>  <script src="../../ui/jquery.ui.core.js"></script>  <script src="../../ui/jquery.ui.widget.js"></script>  <script src="../../ui/jquery.ui.progressbar.js"></script>  <link rel="stylesheet" href="../demos.css">  <script>  $(function() {   $( "#progressbar" ).progressbar({    value: false   });   $( "button" ).on( "click", function( event ) {    var target = $( event.target ),     progressbar = $( "#progressbar" ),     progressbarValue = progressbar.find( ".ui-progressbar-value" );    if ( target.is( "#numButton" ) ) {  ...

JQuery image cycler example

<!DOCTYPE html> <html> <head>  <meta charset="utf-8">  <title>jQuery Image Cycler</title>  <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">  <script src="../../jquery-1.9.1.js"></script>  <script src="../../ui/jquery.ui.core.js"></script>  <script src="../../ui/jquery.ui.widget.js"></script>  <script src="../../ui/jquery.ui.position.js"></script>  <link rel="stylesheet" href="../demos.css">  <style>  body {   margin: 0;  }  #container {   overflow: hidden;   position: relative;   height: 400px;  }  img {   position: absolute;  }  </style>  <script>  $(function() {   $.fn.left = function( using ) {    return this.position({     my: "right middle",     at:...

JQuery tabs example

<!DOCTYPE html> <html lang="en"> <head>  <meta charset="utf-8">  <title>jQuery Tabs</title>  <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">  <script src="../../jquery-1.9.1.js"></script>  <script src="../../ui/jquery.ui.core.js"></script>  <script src="../../ui/jquery.ui.widget.js"></script>  <script src="../../ui/jquery.ui.tabs.js"></script>  <link rel="stylesheet" href="../demos.css">  <script>  $(function() {   $( "#tabs" ).tabs();  });  </script> </head> <body> <div id="tabs">  <ul>   <li><a href="#tabs-1">Nunc tincidunt</a></li>   <li><a href="#tabs-2">Proin dolor</a></li>   <li><a href="#tabs-3">Aenean lacinia</a>...

JQuery dialog example

<!DOCTYPEhtml> <html> <head>  <meta charset="utf-8">  <title>jQuery Dialog</title>  <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">  <script src="../../jquery-1.9.1.js"></script>  <script src="../../ui/jquery.ui.js"></script>  <link rel="stylesheet" href="../demos.css">  <script>  $(function() {   $( "#dialog" ).dialog();  });  </script> </head> <body> <div id="dialog" title="Basic dialog">  <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> </div> <div class="demo-description"> <p>The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through w...

JQuery date picker example

<!DOCTYPE html> <html> <head>  <meta charset="utf-8">  <title>jQuery Date Picker</title>  <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">  <script src="../../jquery-1.9.1.js"></script>  <script src="../../ui/jquery.ui.core.js"></script>  <script src="../../ui/jquery.ui.widget.js"></script>  <script src="../../ui/jquery.ui.datepicker.js"></script>  <link rel="stylesheet" href="../demos.css">  <script>  $(function() {   $( "#datepicker" ).datepicker();  });  </script> </head> <body> <p>Date: <input type="text" id="datepicker"></p> <div class="demo-description"> <p>The datepicker is tied to a standard form input field.  Focus on the input (click, or use the tab key) to open an interactive cal...

JQuery switch class example

<!DOCTYPE html> <html> <head>  <meta charset="utf-8">  <title>jQuery Switch Class Example</title>  <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">  <script src="../../jquery-1.9.1.js"></script>  <script src="../../ui/jquery.ui.effect.js"></script>  <link rel="stylesheet" href="../demos.css">  <style>  .toggler { width: 500px; height: 200px; position: relative; }  #button { padding: .5em 1em; text-decoration: none; }  #effect { position: relative; }  .newClass { width: 240px;  padding: 1em; letter-spacing: 0; font-size: 1.2em; margin: 0; }  .anotherNewClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }  </style>  <script>  $(function() {   $( "#button" ).click(function(){    $( ".newClass" ).switchClass...

JQuery toggle class example

<!DOCTYPE html> <html> <head>  <meta charset="utf-8">  <title>ToggleClass Example</title>  <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">  <script src="../../jquery-1.9.1.js"></script>  <script src="../../ui/jquery.ui.effect.js"></script>  <link rel="stylesheet" href="../demos.css">  <style>  .toggler { width: 500px; height: 200px; position: relative; }  #button { padding: .5em 1em; text-decoration: none; }  #effect {position: relative;  width: 240px;  padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }  .newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }  </style>  <script>  $(function() {   $( "#button" ).click(function() {    $( "#effect" ...

Groovy example of storing values in different data variables

class Datatypes {     public void integer(){         def integer=10;         println integer;     }     public void decimal(){         def decimal=10.67f;         println decimal;     }     public void string(){         def string="0";         println string;     }     public void character(){         def character='a';         println character;     }     public static void main(args){         Datatypes dt=new Datatypes();         dt.integer();         dt.decimal();  ...

Groovy convert every alphabet of a string into its equivalent numeric form

import groovy.io.*; class AlphabetToDigit {     Scanner scan=new Scanner(System.in);     def txt;     def ch;     def str="";     def input(){         try{             printf "Enter A Word: ";             txt=scan.nextLine();             compute(txt);         } catch(e){             System.err.println "Error Occurred!\n$e"+e.getMessage();             System.exit(0);         }     }     def compute(txt){         for(def i in 0..txt.length()-1){      ...

Groovy calculator using menu driven criteria

class Calculator {     def choice;     def number1, number2;     Scanner scan=new Scanner(System.in);     def input(){         try{             printf "***MENU***\n1. Addition\n2. Subtraction\n3. Multiplication\n4. Division\n5. Modulus\nYour Choice: ";             choice=scan.nextInt();             printf "Enter First Number: ";             number1=scan.nextDouble();             printf "Enter Second Number: ";             number2=scan.nextDouble();         } catch(e){             ...