Hi JC,
Best way to do this is by using the Event.observe method
(http://prototypejs.org/api/event/observe)
to attach your fading method to designated divs.
// assign a class name to the divs you want to have the fading behaviour
div class=fadeableClick me to fade away/div
div class=fadeableor
Hi Arun,
A way to go around this is to group your checkboxes by classname. Then
observe the click event on all checkboxes to check/uncheck all other
checkboxes with same classname.
cheers
--
mona
[EMAIL PROTECTED]
On Thu, Nov 27, 2008 at 5:14 AM, Arun [EMAIL PROTECTED] wrote:
Hi Walter ,
I think this is what you are trying to do:
script:
code
script type=text/javascript language=javascript
// ![CDATA[
function myeffect(obj) {
$(obj).fade({ duration: 3.0, from: 0, to: 1 });
}
// ]]
/script
/code
html
code
div onclick=myeffect(this)
Click me to fade
hey arun,
what mona suggested was a perfect solution, but you do not need prototype
help..for implementing it..if you are a developer in javascript...
But prototype easy solution for the requirement...
use Element.observe -- to listen for the toggle on click event..
use
Hey JC,
first let me clarify about this refers to object.
If you are particular in using this...then no need to worry about that
because prototype has got
bind methods with which you can control your scope
Regards,
pradeep.
On Thu, 27 Nov 2008 Mona Remlawi [EMAIL
Hi all,
I have probably find a bug in the latest release of Scriptaculous :
In 1.8.1 (line 612)
destroy: function(element){
var s = Sortable.options(element);
if(s) {
In 1.8.2 (line 612)
destroy: function(element){
element = $(element);
var s =
On Nov 27, 11:32 pm, spradeepkumar [EMAIL PROTECTED] wrote:
[...]
If you are particular in using this...prototype has got
bind methods with which you can control your scope
The value of a function's this keyword has nothing to do with scope,
it is set by the call.
--
Rob
This code works in IE, bot for FF:
var prev = $(element).previousSibling
alert(prev.getHeight())
In FF gives me prev.getHeight()) is not a function.
Has FF gone mad? Have I?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Be sure to extend the previousSibling element:
var prev = $(element).previousSibling
alert($(prev).getHeight())
- Ken
On Thu, Nov 27, 2008 at 8:53 AM, Diodeus [EMAIL PROTECTED] wrote:
This code works in IE, bot for FF:
var prev = $(element).previousSibling
alert(prev.getHeight())
In FF
Nope, that doesn't work either.
On Nov 27, 11:40 am, Ken Snyder [EMAIL PROTECTED] wrote:
Be sure to extend the previousSibling element:
var prev = $(element).previousSibling
alert($(prev).getHeight())
- Ken
On Thu, Nov 27, 2008 at 8:53 AM, Diodeus [EMAIL PROTECTED] wrote:
This code
Is it possible to specify a CSS class name instead of a style for
Effect.Morph?
This doesn't work, I wish it would:
new Effect.Morph('test',{className:'med',duration:.2})
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hi Pradeep and Mona,
Thanks for your valuable comments.
Now i got an idea to do it.
Regards
-Arun
On Nov 27, 6:24 pm, spradeepkumar [EMAIL PROTECTED] wrote:
hey arun,
what mona suggested was a perfect solution, but you do not need prototype
help..for implementing it..if you are a
Maybe, if one were to create an object off screen, run addClass to add
the style, then use getStyle to read it back, and then apply that as
the argument to Morph. Seems like a lot of work, but since Morph uses
getStyle and setStyle internally, that's what will have to happen (I
think).
My 2cents contribution:
What is output for alert(prev)? This will only help in identifing if
the element actually can be identified or even exists...
Regards
jason
On 11/27/08, Diodeus [EMAIL PROTECTED] wrote:
Nope, that doesn't work either.
On Nov 27, 11:40 am, Ken Snyder [EMAIL
I managed to hack my own, although I'll probably have to go test it on
every browser now.
new Effect.Morph(next,{style:getStyle('.med'),duration:.2})
function getStyle(className) {
var classes = document.styleSheets[0].rules || document.styleSheets
[0].cssRules
for(var
$(selector).each(function(){
alert(this);
}.bind($(somethingElse));
sets somethingElse as the 'this' inside of the each function, instead
of the item in the array. That's what spradeepkumar was referring to
by controlling scope.
On Nov 27, 7:14 am, RobG [EMAIL PROTECTED] wrote:
On Nov 27,
oops, I was in jQuery mode.
$('id').each(function(eachThing) {
}.bind($('anotherId'));
still binds another id to this inside of the each function. But for
eventlisteners you need to .bindAsEventListener()
On Nov 27, 7:14 am, RobG [EMAIL PROTECTED] wrote:
On Nov 27, 11:32 pm, spradeepkumar
On Nov 27, 5:54 pm, seasoup [EMAIL PROTECTED] wrote:
[...]
still binds another id to this inside of the each function. But for
eventlisteners you need to .bindAsEventListener()
Not really. `bindAsEventListener` is only needed when currying
arguments to event handler.
[...]
--
kangax
It's already built-in :)
Try either:
new Effect.Morph('test',{style: 'med', duration: 0.2});
or:
$('test').morph('med', { duration: 0.2});
Best,
Tobie
On Nov 27, 9:27 pm, Diodeus [EMAIL PROTECTED] wrote:
I managed to hack my own, although I'll probably have to go test it on
every
On Nov 27, 10:53 am, Diodeus [EMAIL PROTECTED] wrote:
This code works in IE, bot for FF:
var prev = $(element).previousSibling
alert(prev.getHeight())
In FF gives me prev.getHeight()) is not a function.
Has FF gone mad? Have I?
Perhaps, `previousSibling` is not an element node, but a
20 matches
Mail list logo