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

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 835
    • 188
  • Source
  • Commits
  • Network (188)
  • Graphs
  • Tree: aacb34f

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 (19)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 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

demos: removed Slider 'Simple scrollbar' and Tabs 'Simple manipulation' for now 
as both have issues in Safari
rdworth (author)
Tue Mar 03 02:38:12 -0800 2009
commit  aacb34f437811a69be36
tree    cdaf614a11e3ba9e9735
parent  6d8e662744a84da8dd4f
M demos/slider/index.html 1 •
D demos/slider/side-scroll.html 135 •••••
M demos/tabs/index.html 1 •
D demos/tabs/manipulation.html 119 •••••
Txt demos/slider/index.html
  • View file @ aacb34f
... ...
@@ -18,7 +18,6 @@
18 18
     <li><a href="range-vertical.html">Vertical range slider</a></li>
19 19
     <li><a href="multiple-vertical.html">Multiple sliders</a></li>
20 20
     <li><a href="colorpicker.html">Simple colorpicker</a></li>
21  
-    <li><a href="side-scroll.html">Simple scrollbar</a></li>
22 21
   </ul>
23 22
 </div>
24 23
 
Txt demos/slider/side-scroll.html
  • View file @ aacb34f
... ...
@@ -1,135 +0,0 @@
1  
-<!doctype html>
2  
-<html lang="en">
3  
-<head>
4  
-  <title>jQuery UI Slider - Slider scrollbar</title>
5  
-  <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
6  
-  <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
7  
-  <script type="text/javascript" src="../../ui/ui.core.js"></script>
8  
-  <script type="text/javascript" src="../../ui/ui.slider.js"></script>
9  
-  <link type="text/css" href="../demos.css" rel="stylesheet" />
10  
-  <style type="text/css">
11  
-    #demo-frame > div.demo { padding: 10px !important; }
12  
-    .scroll-pane { overflow: auto; width: 99%; float:left; }
13  
-    .scroll-content { width: 2440px; float: left; }
14  
-    .scroll-content-item { width: 100px; height: 100px; float: left; margin: 10px; font-size: 3em; line-height: 96px; text-align: center; }
15  
-    * html .scroll-content-item { display: inline; } /* IE6 float double margin bug */
16  
-    .scroll-bar-wrap { clear: left; padding: 0 4px 0 2px; margin: 0 -1px -1px -1px; }
17  
-    .scroll-bar-wrap .ui-slider { background: none; border:0; height: 2em; margin: 0 auto;  }
18  
-    .scroll-bar-wrap .ui-handle-helper-parent { position: relative; width: 100%; height: 100%; margin: 0 auto; }
19  
-    .scroll-bar-wrap .ui-slider-handle { top:.2em; height: 1.5em; }
20  
-    .scroll-bar-wrap .ui-slider-handle .ui-icon { margin: -8px auto 0; position: relative; top: 50%; }
21  
-  </style>
22  
-  <script type="text/javascript">
23  
-  $(function() {
24  
-    //scrollpane parts
25  
-    var scrollPane = $('.scroll-pane');
26  
-    var scrollContent = $('.scroll-content');
27  
-    
28  
-    //build slider
29  
-    var scrollbar = $(".scroll-bar").slider({
30  
-      slide:function(e, ui){
31  
-        if( scrollContent.width() > scrollPane.width() ){ scrollContent.css('margin-left', Math.round( ui.value / 100 * ( scrollPane.width() - scrollContent.width() )) + 'px'); }
32  
-        else { scrollContent.css('margin-left', 0); }
33  
-      }
34  
-    });
35  
-    
36  
-    //append icon to handle
37  
-    var handleHelper = scrollbar.find('.ui-slider-handle')
38  
-    .mousedown(function(){
39  
-      scrollbar.width( handleHelper.width() );
40  
-    })
41  
-    .mouseup(function(){
42  
-      scrollbar.width( '100%' );
43  
-    })
44  
-    .append('<span class="ui-icon ui-icon-grip-dotted-vertical"></span>')
45  
-    .wrap('<div class="ui-handle-helper-parent"></div>').parent();
46  
-    
47  
-    //change overflow to hidden now that slider handles the scrolling
48  
-    scrollPane.css('overflow','hidden');
49  
-    
50  
-    //size scrollbar and handle proportionally to scroll distance
51  
-    function sizeScrollbar(){
52  
-      var remainder = scrollContent.width() - scrollPane.width();
53  
-      var proportion = remainder / scrollContent.width();
54  
-      var handleSize = scrollPane.width() - (proportion * scrollPane.width());
55  
-      scrollbar.find('.ui-slider-handle').css({
56  
-        width: handleSize,
57  
-        'margin-left': -handleSize/2
58  
-      });
59  
-      handleHelper.width('').width( scrollbar.width() - handleSize);
60  
-    }
61  
-    
62  
-    //reset slider value based on scroll content position
63  
-    function resetValue(){
64  
-      var remainder = scrollPane.width() - scrollContent.width();
65  
-      var leftVal = scrollContent.css('margin-left') == 'auto' ? 0 : parseInt(scrollContent.css('margin-left'));
66  
-      var percentage = Math.round(leftVal / remainder * 100);
67  
-      scrollbar.slider("value", percentage);
68  
-    }
69  
-    //if the slider is 100% and window gets larger, reveal content
70  
-    function reflowContent(){
71  
-        var showing = scrollContent.width() + parseInt( scrollContent.css('margin-left') );
72  
-        var gap = scrollPane.width() - showing;
73  
-        if(gap > 0){
74  
-          scrollContent.css('margin-left', parseInt( scrollContent.css('margin-left') ) + gap);
75  
-        }
76  
-    }
77  
-    
78  
-    //change handle position on window resize
79  
-    $(window)
80  
-    .resize(function(){
81  
-        resetValue();
82  
-        sizeScrollbar();
83  
-        reflowContent();
84  
-    });
85  
-    //init scrollbar size
86  
-    setTimeout(sizeScrollbar,10);//safari wants a timeout
87  
-  });
88  
-  </script>
89  
-</head>
90  
-<body>
91  
-
92  
-<div class="demo">
93  
-
94  
-<div class="scroll-pane ui-widget ui-widget-header ui-corner-all">
95  
-  <div class="scroll-content">
96  
-    <div class="scroll-content-item ui-widget-header">1</div>
97  
-    <div class="scroll-content-item ui-widget-header">2</div>
98  
-    <div class="scroll-content-item ui-widget-header">3</div>
99  
-    <div class="scroll-content-item ui-widget-header">4</div>
100  
-    <div class="scroll-content-item ui-widget-header">5</div>
101  
-    <div class="scroll-content-item ui-widget-header">6</div>
102  
-    <div class="scroll-content-item ui-widget-header">7</div>
103  
-    <div class="scroll-content-item ui-widget-header">8</div>
104  
-    <div class="scroll-content-item ui-widget-header">9</div>
105  
-    <div class="scroll-content-item ui-widget-header">10</div>
106  
-    <div class="scroll-content-item ui-widget-header">11</div>
107  
-    <div class="scroll-content-item ui-widget-header">12</div>
108  
-    <div class="scroll-content-item ui-widget-header">13</div>
109  
-    <div class="scroll-content-item ui-widget-header">14</div>
110  
-    <div class="scroll-content-item ui-widget-header">15</div>
111  
-    <div class="scroll-content-item ui-widget-header">16</div>
112  
-    <div class="scroll-content-item ui-widget-header">17</div>
113  
-    <div class="scroll-content-item ui-widget-header">18</div>
114  
-    <div class="scroll-content-item ui-widget-header">19</div>
115  
-    <div class="scroll-content-item ui-widget-header">20</div>
116  
-  </div>
117  
-  <div class="scroll-bar-wrap ui-widget-content ui-corner-bottom">
118  
-    <div class="scroll-bar"></div>
119  
-  </div>
120  
-</div>
121  
-
122  
-
123  
-
124  
-</div><!-- End demo -->
125  
-
126  
-
127  
-
128  
-<div class="demo-description">
129  
-
130  
-<p>Use a slider to manipulate the positioning of content on the page. In this case, it acts as a scrollbar with the potential to capture values if needed.</p>
131  
-
132  
-</div><!-- End demo-description -->
133  
-
134  
-</body>
135  
-</html>
Txt demos/tabs/index.html
  • View file @ aacb34f
... ...
@@ -14,7 +14,6 @@
14 14
     <li><a href="mouseover.html">Open on mouseover</a></li>
15 15
     <li><a href="collapsible.html">Collapse content</a></li>
16 16
     <li><a href="sortable.html">Sortable</a></li>
17  
-    <li><a href="manipulation.html">Simple manipulation</a></li>
18 17
   </ul>
19 18
 </div>
20 19
 
Txt demos/tabs/manipulation.html
  • View file @ aacb34f
... ...
@@ -1,119 +0,0 @@
1  
-<!doctype html>
2  
-<html lang="en">
3  
-<head>
4  
-  <title>jQuery UI Tabs - Simple manipulation</title>
5  
-  <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
6  
-  <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
7  
-  <script type="text/javascript" src="../../ui/ui.core.js"></script>
8  
-  <script type="text/javascript" src="../../ui/ui.tabs.js"></script>
9  
-  <script type="text/javascript" src="../../ui/ui.dialog.js"></script>
10  
-  <link type="text/css" href="../demos.css" rel="stylesheet" />
11  
-  <style type="text/css">
12  
-    #dialog label, #dialog input { display:block; }
13  
-    #dialog label { margin-top: 0.5em; }
14  
-    #dialog input, #dialog textarea { width: 95%; }
15  
-    #tabs { margin-top: 1em; }
16  
-    #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
17  
-    #add_tab { cursor: pointer; }
18  
-  </style>
19  
-  <script type="text/javascript">
20  
-  $(function() {
21  
-    var $tab_title_input = $('#tab_title'), $tab_content_input = $('#tab_content');
22  
-    var tab_counter = 2;
23  
-
24  
-    // tabs init with a custom tab template and an "add" callback filling in the content
25  
-    var $tabs = $('#tabs').tabs({
26  
-      tabTemplate: '<li><a href="#{href}">#{label}</a> <span class="ui-icon ui-icon-close">Remove Tab</span></li>',
27  
-      add: function(event, ui) {
28  
-        var tab_content = $tab_content_input.val() || 'Tab '+tab_counter+' content.';
29  
-        $(ui.panel).append('<p>'+tab_content+'</p>');
30  
-      }
31  
-    });
32  
-
33  
-    // modal dialog init: custom buttons and a "close" callback reseting the form inside
34  
-    var $dialog = $('#dialog').dialog({
35  
-      autoOpen: false,
36  
-      modal: true,
37  
-      buttons: {
38  
-        'Add': function() {
39  
-          addTab();
40  
-          $(this).dialog('close');
41  
-        },
42  
-        'Cancel': function() {
43  
-          $(this).dialog('close');
44  
-        }
45  
-      },
46  
-      open: function() {
47  
-        $tab_title_input.focus();
48  
-      },
49  
-      close: function() {
50  
-        $form[0].reset();
51  
-      }
52  
-    });
53  
-
54  
-    // addTab form: calls addTab function on submit and closes the dialog
55  
-    var $form = $('form',$dialog).submit(function() {
56  
-      addTab();
57  
-      $dialog.dialog('close');
58  
-      return false;
59  
-    });
60  
-
61  
-    // actual addTab function: adds new tab using the title input from the form above
62  
-    function addTab() {
63  
-      var tab_title = $tab_title_input.val() || 'Tab '+tab_counter;
64  
-      $tabs.tabs('add', '#tabs-'+tab_counter, tab_title);
65  
-      tab_counter++;
66  
-    }
67  
-
68  
-    // addTab button: just opens the dialog
69  
-    $('#add_tab').click(function() {
70  
-      $dialog.dialog('open');
71  
-    }).hover(function() {
72  
-      $(this).addClass("ui-state-hover");
73  
-    }, function() {
74  
-      $(this).removeClass("ui-state-hover");
75  
-    });
76  
-
77  
-    // close icon: removing the tab on click
78  
-    // note: closable tabs gonna be an option in the future - see http://dev.jqueryui.com/ticket/3924
79  
-    $('#tabs span.ui-icon-close').live('click', function() {
80  
-      var index = $('li',$tabs).index($(this).parent());
81  
-      $tabs.tabs('remove', index);
82  
-    });
83  
-  });
84  
-  </script>
85  
-</head>
86  
-<body>
87  
-
88  
-<div class="demo">
89  
-
90  
-  <div id="dialog" title="Tab data">
91  
-    <form>
92  
-      <fieldset class="ui-helper-reset">
93  
-        <label for="tab_title">Title</label>
94  
-        <input type="text" name="tab_title" id="tab_title" value="" class="ui-widget-content ui-corner-all" />
95  
-        <label for="tab_content">Content</label>
96  
-        <textarea name="tab_content" id="tab_content" class="ui-widget-content ui-corner-all"></textarea>
97  
-      </fieldset>
98  
-    </form>
99  
-  </div>
100  
-
101  
-  <button id="add_tab" class="ui-button ui-state-default ui-corner-all">Add Tab</button>
102  
-
103  
-  <div id="tabs">
104  
-    <ul>
105  
-      <li><a href="#tabs-1">Nunc tincidunt</a> <span class="ui-icon ui-icon-close">Remove Tab</span></li>
106  
-    </ul>
107  
-    <div id="tabs-1">
108  
-      <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
109  
-    </div>
110  
-  </div>
111  
-
112  
-</div><!-- End demo -->
113  
-
114  
-<div class="demo-description">
115  
-  <p>Simple tabs adding and removing.</p>
116  
-</div><!-- End demo-description -->
117  
-
118  
-</body>
119  
-</html>

0 notes on commit aacb34f

Please log in to comment.
Blog | Support | Training | 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
  • 中文