mootools

Is Graceful degradation possible for everything? for every javascript and javascript frameworks functionality?

Is Graceful degradation possible for everything? for every javascript and javascript frameworks functionality? ...

MooTools: getChildren() INCLUDING text nodes?

I'd like to get all the children of an element, including text nodes. How can I do this in MooTools? The documentation at mootools.net explicitly says that getChildren() excludes text nodes. ...

MooTools: Attaching to destroy() event

There's a div element on my page. When the page loads, I want to specify somehow that after destroy() is called on this element (based on what the user does in the UI), that a function I specify fires. How can I attach to the destroy() event? ...

How can I use FancyUpload (with mootools) side by side with prototype.js?

I have a site that I am using prototype and scriptaculous on. One one page of my site, I would like to use Digitarald's FancyUploader (I have not found anything else that is as elegant, and offers multiple file selection). Is it possible to use the two on the same page? If so, how would I do it? Thank you, Josh ...

MooTools: Element disposal

Let's say I have two elements on a page. One is a div, and the other is its child, an achor. Let's say that I've added an event to that anchor via anchor.addEvent('click', ...). If I set the div's .innerHTML = '', does the 'click' event associated with the anchor get removed/disposed of/garbage collected? ...

Loading images on a web page using mootools when user scrolls page down

Does anyone know a library that would automatically load images as user scrolls down? The idea is that I want to add user avatars on a wall dynamically when viewport changes. The related HTML would be something like this: <div class="comment"> <a class="avatar" rel="nick" href="users/nick"></a> <p>comment goes here</p> </div> Wh...

MooTools classes

All my MooTools classes look like this: myClass = new Class({ initialize: function(options) { if (optionsType === 'object') { for (var key in options) { this[key] = options[key]; } } } }); Is this necessary? Doesn't MooTools have something built in for me that will p...

PHP - Show status of a form that is processing

I have a form that performs 3 separate tasks when submitted. When the form is submitted, a lightbox/thickbox window appears to show the status. The page posts to itself, and as it completes a task, it writes to the database containing a 'status' field. All this is working fine. I need the current status to appear/refresh in the lightb...

How to execute "eval" without writing "eval" in JavaScript

Here's the deal, we have a big JS library that we want to compress, but YUI compressor doesn't fully compress the code if it finds an "eval" statement, out of fear that it will break something else. That's great and all, but we know exactly what is getting eval'd, so we don't want it to get conservative because there's an eval statement...

What is the best dropdown navigation alternative to Superfish?

I know superfish is amazing, but the terrible CMS we are using conflicts with it in IE6 (hovers break in IE6 when the CMS applies a selected class to the li). I don't know how, but feel free to look at valitics.com/test1. It can be mootools, scriptaculous, whatever, I just need a good alternative to superfish. ...

Mootools + Ruby on Rails == ?

I just wonder if there is any chance to integrate Mootools into Ruby on Rails with working helpers like remote_function() or page.replace() ? ...

Javascript function keeps being called although its class is null

I'd be happy if you could explain to me why shout() keeps getting called, although it's supposedly "gone". var myclass = new Class({ myid: "greatidea", initialize: function(element) { var shout = function() { alert(this.myid); }; shout.periodical(5000, this); // test debug } }); x = new myclass (); alert(x); x=null; alert(...

MooTools Chaining

I don't think a function/method should ever return voidinstead, it should return this. That's why I was surprised to find out that this doesn't work: $('buttonContainer').getElement('input').set('value', this.get('value') + ' '); What the code is suppose to do is find an <input> that is a child of the element with id attribute value ...

How do you grab an element from a remote page using MooTools and Request.HTML?

I'm using MooTools ( part of the project ) to load a page using Request.HTML which works fine except that I don't want the whole page, just one fragment which has an id. This is the code in question var req = new Request.HTML({ onSuccess: function( res ) { // according to the docs // res should be the node list of...

What's wrong with my mootools slide code?

I'm making a accordion-type content section using mootools. Here's the HTML I'm working with: <div class="content-add"> <div class="item html 18" id="dditem_26"> <a id="ddlink_26"></a> <a href="#" class="open ddheader"><strong>F. Tony Hosseini</strong></a> <p>F. Tony Hosseini is the Founder and Chairman of th...

mootools in virtuemart

hi, I am trying to use mootools in my virtuemart module. Basically the module must be able to display an image slider components with the snapshots of products Can any one tell me how to go about it ? ...

Possible JavaScript framework version conflicts when using site-wide vs local page scripts.

I assume this would be an issue with any JavaScript framework. I use MooTools on allot of the pages on my site. On some pages the scripts are 2 years old. When a new page needs MooTools I usually download the latest version to avoid any possible hang-ups with past bugs and to make use of any new features. This has worked fine as my old...

Javascript: Adding ellipsis to HTML text according to container size

I have a div which contains text. The text should be shortened to two lines and "..." added at the end to point that there's more. Since the font and font size may vary according to different users' settings (for example: browser "text size" settings, different browsers, etc.), I need to do this dynamically on the client side. What is...

Is there an jQuery equivalent of MooTools Hash?

I don't think jQuery has a Hash class, so is there an equivalent? I always thought Object does a good job hashing stuff anyway. So what's special about the MooTool's hash besides some of its utility methods? ...

How can I write code without "needing" comments for readability?

Possible Duplicate: Is it possible to write good and understandable code without any comments? When coding often I hear that if comments are needed then it means that the code is too hard to understand. I agree that code should be readable but often the language itself makes the code hard to follow, because of "plumbing" and s...