/    Sign up×
Community /Pin to ProfileBookmark

onMouseDown replace AND hold new image?

Hi There!

I want my [B]left[/B] thumbnails (2) that are black and white to stay colored when clicked on as displayed on mouse over. Is this possible?

Also, when you click a non-active thumbnail, it would make all other thumbnails black and white and the active thumbnail would be the only colored one.

[url]http://www.altosagroup.com/AGAPP/V/test.html[/url]

Hope that makes sense, cheers!
Glenn

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@Arty_EffemSep 14.2007 — Hi There!

I want my [B]left[/B] thumbnails (2) that are black and white to stay colored when clicked on as displayed on mouse over. Is this possible?

Also, when you click a non-active thumbnail, it would make all other thumbnails black and white and the active thumbnail would be the only colored one.

http://www.altosagroup.com/AGAPP/V/test.html

[/QUOTE]
I think [B][COLOR="SeaGreen"]SmartRoll[/COLOR][/B] will accommodate you. If you configure it after any existing rollover handlers, it will add itself to them.
Copy linkTweet thisAlerts:
@dtm32236Sep 14.2007 — i'm not sure I fully understand, but this may help you out.... i've never used CSS Filters, but it seems to work okay.

http://www.fred.net/dhark/demos/css/css_filter_examples.html
Copy linkTweet thisAlerts:
@iamglennauthorSep 14.2007 — Thanks guys,

I think I can get the css filters to work and they would do the trick, the grayscale filter isn't working in ff though.
Copy linkTweet thisAlerts:
@iamglennauthorSep 14.2007 — Thanks for the link Arty, with further research I think your solution should do the job, I am a bit confused on how to set it up though.

With the js file linked in, I have something like this:

[CODE]<SCRIPT type='text/javascript'>

SmartRoll.overTriState
(
'buttonset1',
'btn1', '/images/screen-shots/balanced_body_bw_01.jpg', '/images/screen-shots/balanced_body_01.jpg',
'btn2', '/images/hov2.gif', '/images/act2.gif'
);



</SCRIPT>

<SCRIPT type='text/javascript'>

SmartRoll.over
(
'myButtons',
'btn1', '/images/hov1.gif',
'btn2', '/images/hov2.gif'
);

</SCRIPT>[/CODE]


[CODE] <ul id="maintab" class="shadetabs">


<li class="selected"><a href="#default" rel="ajaxcontentarea"><img src="/images/screen-shots/balanced_body_bw_01.jpg" border="0" alt='Button' name="btn1"></a></li>


<li><a href="external.html" rel="ajaxcontentarea"><img src="/images/screen-shots/cslb_bw_01.jpg" border="0" name="btn2" /></a></li>
</ul>
[/CODE]
Copy linkTweet thisAlerts:
@Arty_EffemSep 14.2007 — 
With the js file linked in[/quote]
Not quite, you're trying to include 'smartroll.cs'.

The call to SmartRoll.over/overTrisTate should not be in the head but in the body, below all the elements to which it refers.
Copy linkTweet thisAlerts:
@iamglennauthorSep 14.2007 — Woops!

Wow that works perfectly, thanks a ton, have a blast this weekend!
×

Success!

Help @iamglenn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...