github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 839
    • 189
  • Source
  • Commits
  • Network (189)
  • Graphs
  • Tree: 78bddbe

click here to add a description

click here to add a homepage

  • Switch Branches (8)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
    • widget-super
  • Switch Tags (20)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.3
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

updated classes more to use all animated properties
scottjehl (author)
Fri Feb 27 11:06:57 -0800 2009
commit  78bddbe8df4d15844b72
tree    e37e3eea1a511f224fbb
parent  79a1d82582931de73214
M demos/addClass/default.html 22 ••••
M demos/removeClass/default.html 20 ••••
M demos/switchClass/default.html 22 ••••
M demos/toggleClass/default.html 17 ••••
Txt demos/addClass/default.html
  • View file @ 78bddbe
... ...
@@ -9,22 +9,19 @@
9 9
   <style type="text/css">
10 10
     .toggler { width: 500px; height: 200px; position: relative;}
11 11
     #button { padding: .5em 1em; text-decoration: none; }
12  
-    #effect {position: relative; }
13  
-    #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
14  
-    .ui-effects-transfer { border: 2px dotted gray; } 
15  
-    .first { width: 240px; height: 135px; padding: 0.4em;  font-size: 1.2em; border: 1px solid #000; background: #fff; color: #333; }
16  
-    .second { width: 480px; height: 135px; padding: 0.8em; font-size: 1.6em; border: 5px solid #4f5b8c; background: #ddebf4; color: #2c4359; } 
  12
+    #effect {position: relative;  width: 240px;  padding: 1em;  font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
  13
+    #effect.newClass { line-height: 2; text-indent: 40px; opacity: .8; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; border: 5px solid orange; background: #2c4359; color: #fff; } 
17 14
   </style>
18 15
   <script type="text/javascript">
19 16
   $(function() {
20 17
     $("#button").click(function() {
21  
-      $('#effect').addClass('second', 1000, callback);
  18
+      $('#effect').addClass('newClass', 1000, callback);
22 19
     });
23 20
     
24 21
     function callback(){
25 22
       setTimeout(function(){
26  
-        $('#effect').removeClass('second');
27  
-      }, 1000);
  23
+        $('#effect').removeClass('newClass');
  24
+      }, 1500);
28 25
     }
29 26
   });
30 27
   </script>
... ...
@@ -34,11 +31,8 @@
34 31
 <div class="demo">
35 32
 
36 33
 <div class="toggler">
37  
-  <div id="effect" class="first ui-widget-content ui-corner-all">
38  
-    <h3 class="ui-widget-header ui-corner-all">Add Class</h3>
39  
-    <p>
40  
-      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
41  
-    </p>
  34
+  <div id="effect" class=" ui-corner-all">
  35
+      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
42 36
   </div>
43 37
 </div>
44 38
 
... ...
@@ -48,7 +42,7 @@
48 42
 
49 43
 <div class="demo-description">
50 44
 
51  
-<p>Click the button above to preview the effect.</p>
  45
+<p>This demo adds a class which animates: line-height, text-indent, opacity, letter-spacing, width, height, padding, margin, font-size, border color, border-width, background color, and font color. </p>
52 46
 
53 47
 </div><!-- End demo-description -->
54 48
 
Txt demos/removeClass/default.html
  • View file @ 78bddbe
... ...
@@ -9,22 +9,19 @@
9 9
   <style type="text/css">
10 10
     .toggler { width: 500px; height: 200px; position: relative;}
11 11
     #button { padding: .5em 1em; text-decoration: none; }
12  
-    #effect {  position: relative; }
13  
-    #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
14  
-    .ui-effects-transfer { border: 2px dotted gray; } 
15  
-    .first { width: 240px; height: 135px; padding: 0.4em;  font-size: 1.2em; border: 1px solid #000; background: #fff; color: #333; }
16  
-    .second { width: 480px; height: 135px; padding: 0.8em; font-size: 1.6em; border: 5px solid #4f5b8c; background: #ddebf4; color: #2c4359; } 
  12
+    #effect {position: relative;  width: 240px;  padding: 1em;  letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
  13
+    #effect.newClass { line-height: 2; text-indent: 40px; opacity: .8; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; border: 5px solid orange; background: #2c4359; color: #fff; } 
17 14
   </style>
18 15
   <script type="text/javascript">
19 16
   $(function() {
20 17
     $("#button").click(function() {
21  
-      $('#effect').removeClass('second', 1000, callback);
  18
+      $('#effect').removeClass('newClass', 1000, callback);
22 19
     });
23 20
     
24 21
     function callback(){
25 22
       setTimeout(function(){
26  
-        $('#effect').addClass('second');
27  
-      }, 1000);
  23
+        $('#effect').addClass('newClass');
  24
+      }, 1500);
28 25
     }
29 26
   });
30 27
   </script>
... ...
@@ -34,11 +31,8 @@
34 31
 <div class="demo">
35 32
 
36 33
 <div class="toggler">
37  
-  <div id="effect" class="first second ui-widget-content ui-corner-all">
38  
-    <h3 class="ui-widget-header ui-corner-all">Remove Class</h3>
39  
-    <p>
40  
-      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
41  
-    </p>
  34
+  <div id="effect" class="newClass ui-corner-all">
  35
+      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. 
42 36
   </div>
43 37
 </div>
44 38
 
Txt demos/switchClass/default.html
  • View file @ 78bddbe
... ...
@@ -9,17 +9,16 @@
9 9
   <style type="text/css">
10 10
     .toggler { width: 500px; height: 200px; position: relative;}
11 11
     #button { padding: .5em 1em; text-decoration: none; }
12  
-    #effect { position: relative; }
13  
-    #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
14  
-    .ui-effects-transfer { border: 2px dotted gray; } 
15  
-    .first { width: 240px; height: 135px; padding: 0.4em;  font-size: 1.2em; border: 1px solid #000; background: #fff; color: #333; }
16  
-    .second { width: 480px; height: 135px; padding: 0.8em; font-size: 1.6em; border: 5px solid #4f5b8c; background: #ddebf4; color: #2c4359; } 
  12
+    #effect {position: relative;   }
  13
+    #effect.newClass { width: 240px;  padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
  14
+    #effect.anotherNewClass { line-height: 2; text-indent: 40px; opacity: .8; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; border: 5px solid orange; background: #2c4359; color: #fff; } 
  15
+
17 16
   </style>
18 17
   <script type="text/javascript">
19 18
   $(function() {
20 19
     $("#button").click(function(){
21  
-        $(".first").switchClass('first', 'second', 1000);
22  
-        $(".second").switchClass('second', 'first', 1000);
  20
+        $(".newClass").switchClass('newClass', 'anotherNewClass', 1000);
  21
+        $(".anotherNewClass").switchClass('anotherNewClass', 'newClass', 1000);
23 22
     });
24 23
   });
25 24
   </script>
... ...
@@ -28,15 +27,12 @@
28 27
 
29 28
 <div class="demo">
30 29
 
  30
+
31 31
 <div class="toggler">
32  
-  <div id="effect" class="first ui-widget-content ui-corner-all">
33  
-    <h3 class="ui-widget-header ui-corner-all">Switch Class</h3>
34  
-    <p>
35  
-      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
36  
-    </p>
  32
+  <div id="effect" class="newClass ui-corner-all">
  33
+      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. 
37 34
   </div>
38 35
 </div>
39  
-
40 36
 <a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
41 37
 
42 38
 </div><!-- End demo -->
Txt demos/toggleClass/default.html
  • View file @ 78bddbe
... ...
@@ -9,16 +9,14 @@
9 9
   <style type="text/css">
10 10
     .toggler { width: 500px; height: 200px; position: relative;}
11 11
     #button { padding: .5em 1em; text-decoration: none; }
12  
-    #effect { position: relative; }
13  
-    #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
14  
-    .ui-effects-transfer { border: 2px dotted gray; } 
15  
-    .first { width: 240px; height: 135px; padding: 0.4em;  font-size: 1.2em; border: 1px solid #000; background: #fff; color: #333; }
16  
-    .second { width: 480px; height: 135px; padding: 0.8em; font-size: 1.6em; border: 5px solid #4f5b8c; background: #ddebf4; color: #2c4359; } 
  12
+    #effect {position: relative;  width: 240px;  padding: 1em; letter-spacing: 0; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
  13
+    #effect.newClass { line-height: 2; text-indent: 40px; opacity: .8; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; border: 5px solid orange; background: #2c4359; color: #fff; } 
  14
+
17 15
   </style>
18 16
   <script type="text/javascript">
19 17
   $(function() {
20 18
     $("#button").click(function() {
21  
-      $('#effect').toggleClass('second', 1000);
  19
+      $('#effect').toggleClass('newClass', 1000);
22 20
     });
23 21
   });
24 22
   </script>
... ...
@@ -28,11 +26,8 @@
28 26
 <div class="demo">
29 27
 
30 28
 <div class="toggler">
31  
-  <div id="effect" class="first ui-widget-content ui-corner-all">
32  
-    <h3 class="ui-widget-header ui-corner-all">Toggle Class</h3>
33  
-    <p>
34  
-      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
35  
-    </p>
  29
+  <div id="effect" class="newClass ui-corner-all">
  30
+      Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. 
36 31
   </div>
37 32
 </div>
38 33
 

0 notes on commit 78bddbe

Please log in to comment.
Blog | Support | Training | Job Board | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文