I would like an element to receive an event and perform some action when it is injected into the DOM. Is there any event available to perform this?
Something like the following:
new Element('div', {
events : {
insertedIntoDom : function() {
// Do something
}
}
})
Thanks
...
Can any one reply me which of the javascript frameworks are better to implement on my project?
jQuery or Mootools?
...
How can I exit the each function when the conditions was true once?
This does not work:
$$('.box div').each(function(e) {
if(e.get('html') == '') {
e.set('html', 'test');
exit;
}
});
...
Okay, so I got jQuery to get along with MooTools with one script, by adding this at the top of the jQuery script:
var $j = jQuery.noConflict();
and then replacing every:
$(
with
$j(
But how would you get MooTools to like the following script that using jQuery??
Thanks in advance for any input,
Tracy
//Fade In Content Viewer: ...
I'm trying to get some pre-existing MooTools code to function properly within a Drupal site. I know the MooTools code works on its own. Once I load the MooTools library in the page, jQuery stops functioning.
I am including MooTools after jQuery, which (according to the MooTools developers) should prevent Moo from stealing the already de...
Hi all, i'm using Mootools 1.2. Ihave 15 Forms with same name only change in their id's like
form1, form2, form3, ... ,form15 same with their elements. i need to submit all forms by ajax.
For that purpos i make a function and call them on each functions onClick event.
function is
function addStepConfiguration(id,mystrip,comment,error,su...
i need to make a drag and drop list for re-ordering which is longer than the screen height.
in order to make this usable, the window needs to scroll while the element selected and the mouse is near the boundaries of the screen.
what is the best way to achieve this?
thanks :)
...
I've been using Mootools 1.2.4 as my JS framework of choice. I've added Checkout by Amazon to one of my pages, and they inject jQuery 1.2.6 into the page and messes up my dollar function (among other things).
I have control over Mootools, but not jQuery. I would rather not rewrite my existing code to accomodate jQuery since Checkout by ...
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools-yui-compressed.js"></script>
<script type="text/javascript" src="sexyalertbox.v1.2.moo.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="sexyalertbox.css"/>
<body>
<p><a href="#" onclick="Sexy.aler...
similar to to this here...
http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
i know i can change each element's style's individually, but i want to change a lot of elements styles at the same time, and the browser seems to struggle over about 40 elements.
thanks :)
...
Hi everyone, I am trying to achieve this task using MooTools.
Description:
I attached an event listener to myButton link. A click on this link initiates an AJAX request and updates myDiv content based on the response text.
During this request a POST variable is being sent to "button.php", but it's not used at the moment.. (i wish to us...
I have an html:
First name: <input type='text' name='first_name' value='' /><br/>
Last name: <input type='text' name='last_name' value='' /><br/>
<input type='checkbox' name='category[]' value='Math' /> Math<br/>
<input type='checkbox' name='category[]' value='Science' /> Science<br/>
<input type='checkbox' name='category[]' value='Hist...
I want to make a gallery with slimbox but cannot get it to run the script.
I'm using an ASP.NET Master Page and want the script to be retrieved on this page.
The code I am using is:
<script type="text/javascript" src="js/slimbox.js"></script>
<script type="text/javascript" src="js/mootools.js"></script>
...
There are several questions about this already, but they are from awhile ago, so here goes:
I have this half-made project that was built using prototype, but am looking into moving to a javascript library I am way more familiar about: mootools.
Is there a way so I don't have to change any of my current rjs? e.g. remote_form_for
Thank ...
Hi everyone!
I´m creating a website for a photographer who would like a fine fadein on his images. I have excluded flash as a solution and would like to use those fine-looking effects of mootools fx. But the problem is that I'm really lousy when it comes to javascript. So if anyone could give me an easy solution for fading in one single...
Hello,
I am have implemented a modalbox into my website, the works on a <a> like below,
<a href="http://www.example.com" rel="moodalbox">External Site</a>
Click this link will launch example.com in a modal window. I am wanting to recreate this effect however instead of using a link I would like to use a checkbox, is this possible?...
I have some tabs which have been created using Javascript and Mootools, my client wants the 'next button' at the bottom of the page to be disabled, until the tabs have been read(clicked). The page is dynamic (created with PHP and MySQL) and there could be two tabs or three, depending on the set-up. I am struggling today to think of the b...
Hello, I have the following HTML
<div class="goto_step3">
<a href="<?= $this->sitePfx ?>/cart/paypal/" id="js_checkout_now" class="arrow">Checkout & Pay</a>
<? if($this->discountCodeErrorMessage): ?>
<p class="error discountError"><?= $this->discountCodeErrorMessage ?></p>
<? endif; ?>
<div class="discountCode fncFixedHeight <?=...
I am trying to add Multiple NoobSlides onto one page.
From the sample page listed here:
http://www.efectorelativo.net/laboratory/noobSlide/
I have sample 8 and want to add two Sample 5 slideshows side by side on the same page, but when I try it, the second slideshow events don't trigger.
...
hi i have a script
<script type="text/javascript">
window.addEvent('domready', function(){
var totIncrement = 0;
var increment = 560;
var maxRightIncrement = increment*(-6);
var fx = new Fx.Style('slider-list', 'margin-left', {
duration: 1000,
transition: Fx.Transitio...