mootools

Mootools - how to destroy a class instance

What I'm trying to do is create a class that I can quickly attach to links, that will fetch and display a thumbnail preview of the document being linked to. Now, I am focusing on ease of use and portability here, I want to simply add a mouseover event to links like this: <a href="some-document.pdf" onmouseover="new TestClass(this)">Tes...

Usage of initialize() vs. setup() in Mootools

Mootools classes have an initialize() method that's called when a new object is instantiated. It seems that setup() is a commonly used method as well. Most classes I've observed call this.setup() from initialize() and nowhere else, which has left me wondering: What's the purpose of setup()? Why not just put the setup() code in initial...

how do I use mootools

Help me with installing this please ...

mootools changing an elements inline css

I have some HTML that looks like this, <div id="mb_contents" style="visibility: visible; opacity: 1; width: 600px; height: 450px;"> I am trying to turn the visibilty to hidden using this js/mootools, $('mb_overlay').set('styles', { 'visibilty': 'hidden', }); However nothing seems to be working, am I missing som...

Mootools periodical funcion and time rewind

Hello ! I have some function taht is caller periodically: var func = function() { alert('Hello world!'); }; func.periodical(5000); This function is also called with click event: $('element').addEvent('click', function(){ func(); }); The timer starts and counts 2500msec, then I click $('element'), func() is executed and I w...

Mootools accordion inside another...

Hi all, This is a funny one... I have created a mootools accordion with tabs, each section appears when clicked. This works fine. Now within the first accordion that shows, I have another accordion that displays more data. This was to keep the area small with the mass of information that is needed on the page. All works fine, the prob...

MooTools request fails

Hi everyone, I am trying to achieve this task using MooTools. Description: I have three buttons. Two buttons outside myDiv and one button inside myDiv. A click on any of these buttons initiates an AJAX request (passing button variable to "button.php") and updates myDiv content based on the response text. So, after update, myDiv shows B...

MooTools/JavaScript variable scope

I am trying to make each number displayed clickable. "1" should alert() 80, "2" should produce 60, etc. However, when the alert(adjust) is called, it only shows 0, not the correct numbers. However, if the commented out alert(adjust) is uncommented, it produces the correct number on page load, but not on clicking. I was wondering why t...

I have a filter for jquery masonry - but I want to filter moomasonry

Hi, I'm using jquery masonry for layout. But I am considering moving to mootools. I have found a masonry port to mootools, called moomasonry - http://www.crionics.com/products/opensource/mooMasonry/Demos/basic.html With help here, I have a filter on the masonry divs by class: $('a.filter').click(function(){ filterBoxes(this.id);...

compatibility when using the mootools library in a widget?

i want to use the mootools library to do animation & ajax in a widget i'm building. i plan to have the widget write itself into the page so the end user just deploys a single line of javascript. i'm concerned about the compatibility issues that may arise if my widget is used on a page which is already using another library. short test...

Mootools: add HTML text to an Element

Hello, i'm using mootools.js, i have this code: this.html.chat_title = new Element('span', { 'id' : 'chat_title', html : 'this is the title' }).inject(this.html.container); The problem is: span id="chat_title" html="this is the title" as you see it doesn't put the text inside the HTML of the tag but as an attribute. What i...

Cannot get jQuery Lightbox working on Joomla

Hi Guys, I have followed these instructions at Balupton to the word but I cannot seem to get this lightbox working. I managed to get this working on another Mambo project last year but I cannot get this working on Joomla and I was wondering if it could be that there is a clash between Moo Tools and jQuery. Although this should not be th...

Dom Element onclick (MooTools :: optionally)

Consider the following example: function async_callback(array1, array2, array3) { // All arrays are equal length for(var i = 0; i < array1.length; i++) { var myElement = new Element('div', { 'id': 'dvMy' + i, 'events': { 'click': function() { SomeFunction(array1[i], array2[i], array3[i] } }}); $(document).appendChild(myElem...

Creating a grid overlay over image.

Hi everybody, I made a script (using mootools library) that is supposed to overlay an image with a table grid and when each grid cell is clicked/dragged over its background color changes 'highlighting' the cell. Current code creates a table and positions it over the element (el, image in this case). Table was used since I am planning t...

Difficulty with MooTools Class.extend

Consider the following code: var Widget = new Class({ Implements: [Options], options: { "name" : "BaseWidget" }, initialize: function(options) { alert("Options are: " + JSON.stringify(options)); //alerts "Options are: undefined" this.setOptions(options); alert("My optio...

Can anyone advice me some HistoryManager( to use with AJAX ) to use with MooTools that will handle browser back and forward buttons ?

I've tried to use http://digitarald.de/project/history-manager/ but whether it doesn't work with mootools 1.2 whether i'm writing wrong code :( ...

MooTools and Joomla, how does it work?

I've heard that mootools is installed with Joomla and you can use it from within any extension you build without having to include it again, is that correct? I've been learning some JQuery and i wanted to build a module with it but now that mootools is included i'd rather do it with it. Is there a good tutorial on using mootools inside ...

IE8 Throwing a Security Error with MooTools

Okay so like everything else IE8 is giving some serious problems. When trying to load MooTools into the browser IE8 just gives me a "A security problem occurred" error. I think it may have something to do with the clashing of files or something but I can't seem to figure it out. Here's a web address so you can see for yourself. http://w...

mootools Fx.slide not working IE6

Hi there, I have some javascript that is built on top of mootools that is basically giving a div some show/hide functionality. window.addEvent('domready', function(){ /*var mySlide = new Fx.Slide('customise_text').hide() var mySlide2 = new Fx.Slide('customise_link').hide() $('customise').addEvent('click', function(e){ $('customise...

XML with Prototype and Moo Tools

Hi Guys, Is there any library to handle easily Xml with Prototype or Mootools? ...