Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

JavaScript class for making div elements resizable.

NotificationsYou must be signed in to change notification settings

phantomxc/Resizable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple class for making HTML elements easily resizable.

Usage

This relies on thePrototype.js Library

##Basic usage:

new Resizable(element [, options]);element - An id or an elementoptions - Optional object with options. See Options.

###Example:

<script type="text/javascript" src="prototype.js"><script><script type="text/javascript" src="resizable.js"><script><script type="text/javascript">    document.observe('dom:loaded', function(ev) {        new Resizable($('elementID'));    });</script>

##Options

OptionDefinition
default_styleBool, Default : true Include some default styling for the resizable handle
class_nameString, Default : 'resizer' Class name for the resizable handle
onStartFunction, Default : null A function to be called when resizing starts
onEndFunction, Default : null A function to be called when resizing ends

###Advanced Example

//Open example.html to see this in action<script type="text/javascript" src="tests/lib/prototype.js"></script><script type="text/javascript" src="resizable.js"></script><script type="text/javascript">    document.observe('dom:loaded', function(ev) {        new Resizable($('resize_me'), {            'default_style':true,            'class_name':'resizable',            'onStart': function() {                console.log('resize start');            },            'onEnd': function() {                console.log('resize end');            }        });    });</script>

License

Copyright 2012 Cameron Wengert

Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

About

JavaScript class for making div elements resizable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp