Resizable directive in AngularJS and jQueryUI
How do I make an resizable directive in angularjs and jqueryui?
What is a resizable directive in angularjs and jqueryui? How do you make a resizable directive in angularjs and jqueryui? This script and codes were developed by Fabio Biondi on 13 October 2022, Thursday.
Resizable directive in AngularJS and jQueryUI - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Resizable directive in AngularJS and jQueryUI</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <head> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js"></script>
</head>
<body class="jumbotron" ng-controller="MainCtrl" ng-app="myApp"> <h2>Resizable directive in AngularJS and jQueryUI</h2> <p>Drag the cursor to resize</p> <div resizable on-resize="resize($evt, $ui)" class="box">Resizable Div!</div> <div ng-show="w">{{w}}:{{h}}px</div>
</body> <script src="js/index.js"></script>
</body>
</html>
Resizable directive in AngularJS and jQueryUI - Script Codes CSS Codes
.box { width: 200px; height: 200px; line-height: 200px; color: white; text-align: center; vertical-align: middle; background: -webkit-linear-gradient(red, #ccc); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(red, #ccc); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(red, #ccc); /* For Firefox 3.6 to 15 */ background: linear-gradient(red, #ccc); /* Standard syntax */
}
Resizable directive in AngularJS and jQueryUI - Script Codes JS Codes
(function () { 'use strict'; angular.module('myApp', []) .directive('resizable', function () { return { restrict: 'A', scope: { callback: '&onResize' }, link: function postLink(scope, elem, attrs) { elem.resizable(); elem.on('resize', function (evt, ui) { scope.$apply(function() { if (scope.callback) { scope.callback({$evt: evt, $ui: ui }); } }) }); } }; }) .controller('MainCtrl', function ($scope) { $scope.resize = function(evt,ui) { //console.log (evt,ui); $scope.w = ui.size.width; $scope.h = ui.size.height; } });
})();
Developer | Fabio Biondi |
Username | fabiobiondi |
Uploaded | October 13, 2022 |
Rating | 3 |
Size | 2,265 Kb |
Views | 70,840 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
D3.js Multi-Foci Force layout animated example | 2,845 Kb |
FlexBox - Grid 2x2 | 1,685 Kb |
Responsive DOM elements distribution with D3 and Scales | 3,323 Kb |
AngularJS 1.2.x - FullScreen Directive | 3,059 Kb |
FlexBox - Grid 2 rows with different columns | 1,775 Kb |
Realtime todo-list in AngularJS and Firebase in 20 lines | 2,432 Kb |
AngularJS Form Validation | 2,249 Kb |
D3 Pack Layout with transitions and tooltips | 3,981 Kb |
AngularJS Directive - YouTube DATA API example | 2,309 Kb |
AngularJS - Day 1 - Boilerplate | 1,556 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Weird glowy CSS3 game | Toneworm | 3,684 Kb |
CSS Grid Test | Ajaykarwal | 2,377 Kb |
Animated Vertical CSS3 Menu Black | MaCeLMp4 | 2,750 Kb |
Fluid Responsive Typography | Jonmilner | 4,205 Kb |
Pomodoro Timer | Sdas13 | 2,900 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
Email Marketing Mock | Kristenzirkler | 8,224 Kb |
DNA Double Helix | Hugo | 5,112 Kb |
Sticky div | Kaslab | 2,225 Kb |
A Pen by Theun | Tjoen | 6,152 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!