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

benatkin / jquery-stuff

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: fc86b3c

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

plugins, examples, snippets — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

fixed error when firebug isn't turned on 
benatkin (author)
Tue Jun 23 14:12:11 -0700 2009
commit  fc86b3c1e23c716469841759677f9617bc712ae7
tree    feb4884b16cb80a377f2094834d186ffc34c00b7
parent  11677322de0c900b4988d619c4f4baef2a4678da
jquery-stuff / convenience.html convenience.html
100644 30 lines (27 sloc) 0.922 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
<head>
  <title>convenience</title>
  <script type="text/javascript" src="jquery.js"></script>
  <script type="text/javascript" src="jquery.convenience.js"></script>
  <script type="text/javascript">
    $(function() {
      $.each(['red', 'green'], function() {
        var btn = $('<input>').attr({type: 'button', value: 'Frobnicate This!'}).addClass('frob');
        $('<div>').addClass(this).css({backgroundColor: this}).appendTo($('body')).append(btn);
      });
      $('div').css({width: '200px', height: '200px', padding: '20px', 'float': 'left'});
 
      $.convenience('frobnicate');
      $('.green').frobnicate(function() {
        if (console) console.log('frobbed!');
        $(this).css({border: '5px solid black'});
      });
      $('.frob').click(function() {
        if (console) console.log('clicked!');
        $(this).frobnicate();
      });
    });
  </script>
</head>
<body>
</body>
</html>
 
 
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