yui

what is the jQuery outerHeight() equivalent in YUI

萝らか妹 提交于 2019-12-05 01:43:40
In jQuery, I can very easily get the current computed height for an element that includes padding, border, and optionally margin by using outerHeight() ... // returns height of element + border + padding + margin $('.my-element').outerHeight(true); How would I do this in YUI? I'm currently using version 2.8.1 . Similar to this question , I can always do getComputedStyle() for height, border, padding, and margin, but that is a lot of manual labor which includes parsing the return values and grabbing the correct values that are needed and doing the math myself. Isn't there some equivalent

Comparing YUI and Ext JS [closed]

蓝咒 提交于 2019-12-04 22:09:06
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I've been using Ext JS as my rich-widget toolkit for a while, but I'm thinking of moving to YUI, partly because of the less

YUI modifying and detecting changes of a <div>

喜夏-厌秋 提交于 2019-12-04 22:03:25
I want to see an alert message when the value of a div changes. This value is being modified by modify_div. When I click the button this function modifies the div, but the alert "value changed" is not displayed. Am I missing something? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script> <script> YUI().use('node', function (Y) { var demo = Y.one('#test'); demo.on('click', function (e) { //alert('You clicked me'); }); }); YUI().use('node','event', function (Y) { var

How to use find function in YUI3? And how to find meta tag list?

谁说胖子不能爱 提交于 2019-12-04 22:02:50
Like jQuery we can collect the array of matched DOM element of class 'anything' with the help of 'find' function Can i have same functionality in YUI3? Edit 1: As i have website source code with the help of php 'file_get_content' function and i want to find the list of meta tag by YUI3. Here i used module named 1. io-base : to get the website source code in ajax mode 2. node : to implement functionality over code. May i know how to parse the responseText to get the list of meta tag? You can find the collection of all matched elements like this. YUI().use('node', function(Y){ var myElements = Y

Translate the following jQuery code to YUI 2.x code

ⅰ亾dé卋堺 提交于 2019-12-04 19:10:35
Disclaimer: I have no experience using YUI at all. I was wondering how the following lines of jQuery code would look when written in YUI. Also, since YUI is using a hierarchical dependency system, which .js files need to be included in order for the code to work? 1. Given the ID of an HTML element, apply multiple style rules on the element. $('#foo').css({ color: 'yellow', background: 'black' }); 2. Chaining: given an ID of an HTML element, apply a style rule on it, add a class of bar to it, and set its contents to '!'. $('#foo').css('color', 'red').addClass('bar').html('!'); 3. Append a LI

Save, Edit, Delete, and Cancel events in AlloyUI Scheduler

筅森魡賤 提交于 2019-12-04 17:04:23
How can I listen for the Save, Edit, Delete, and Cancel events from AlloyUI's Scheduler? I need to save the value in our database for future use, but I don't see any documentation for this. The current code that I have is this: YUI().use('aui-scheduler', function(Y) { var items = [ { content: 'Wake Early' }, { content: 'Exercise' }, ]; var schedulerViews = [ new Y.SchedulerWeekView(), new Y.SchedulerDayView(), new Y.SchedulerMonthView(), new Y.SchedulerAgendaView() ]; var eventRecorder = new Y.SchedulerEventRecorder(); new Y.Scheduler({ boundingBox: '#scheduler', items: items, views:

ellipsifying the text in a yui datatable

好久不见. 提交于 2019-12-04 16:10:23
hey I'm looking for a good way to ellipsify text in a yui datatable. By that I mean, formatting the text so that it fits nicely into its cell and has an ellipse (...) trailing it if the text had to be truncated. I want to do this wihtout the use of CSS selectors, because I have a large dataset and selecting each cell by classname would be expensive. Any good suggestions on how to do this using a formatter or something similar. I came up with this idea. The script will measure the content of div and if its width is above div's width, it will shrink the content a little bit, so ellipsis char

Compression issues with JQuery file in YUI Compressor

时光总嘲笑我的痴心妄想 提交于 2019-12-04 15:28:48
问题 I am trying to minify a few files with YUI compressor. However, I seem to be getting an error on 2 lines of code, which prevents compression. The .js file for jcarouselLite contains 1 error, and my own code contains the other. I have narrowed it down and in both occasions it looks like the the float property used in jQuery is causing this. The line is: li.css({overflow: "hidden", float: o.vertical ? "none" : "left"}); (jcarousellite) $("#now-playing .js-kit-rating div:first").css({width:

Every flash uploader giving bad progress values

我是研究僧i 提交于 2019-12-04 13:06:50
The file upload script I wrote early last year for an internal website has been misbehaving oddly on a number of machines. On some machines it consistently works fine, on others it consistently misbehaves. I am having exactly the same problem with YUI Uploader, SWFUpload (2.2 and 2.5a), and Uploadify. On the misbehaving machines, the progress event (or callback as the case may be) is reporting the upload going far too quickly. It is progressing around 9 or 10MB/s, instead of the 50 or 60kb/s that is actually going on. The progress bar fills up very quickly, and then no more progress events are

Rich Text (YUI) Editor Broken on IE11

こ雲淡風輕ζ 提交于 2019-12-04 07:24:56
I'm running Internet Explorer 11 and YUI 2: Rich Text Editor seems not working. Please see attached screen shot for more detail. Any ideas how to fix this under IE11? kinglomei For IE changed its User-Agent, YUI(2.9) need a surgery. Modify yahoo-dom-event.js: Find this: YAHOO.env.parseUA, then at last add something that tell YAHOO.env.ua now is undering IE 11. like this: if (g.ie == 0 && c.indexOf('Trident') != -1){ g.ie = 11; } Modify editor.js: Find the _setInitialContent function, and after the if-branch that includes "BackCompat", add this: this.browser = YAHOO.env.parseUA(); then just in