Advertisement

Plus/Minus Images in Show/Hide Content Script.

Moderators: Calcifer, slothy

Plus/Minus Images in Show/Hide Content Script.

Postby muhdkashif » Sat Jan 02, 2010 10:47 am

I’m using the sliding show/hide script which is very nice.
I would like to add Plus/Minus Images in the Question, such that when I click Question it will show the answer with Minus Images and when I click again the Question it will hide the answer with Plus Image, just like shows in MSDN.

Can anyone help me???
muhdkashif
 
Posts: 3
Joined: Mon Sep 28, 2009 12:31 pm

Postby cosmicegg » Thu Feb 25, 2010 10:33 am

hey this is what i did:

function showHideAnswer()
{
var numericID = this.id.replace(/[^\d]/g,'');
var obj = document.getElementById('a'+numericID);
var obj2 = document.getElementById('q'+numericID);

if(obj.style.display=='block')
{
obj.style.display='none';
obj2.style.background='url(arrowdown.png) right top no-repeat';
}
else
{
obj.style.display='block';
obj2.style.background='url(arrow1up.png) right top no-repeat';
}
}
cosmicegg
 
Posts: 1
Joined: Thu Feb 25, 2010 10:31 am

Postby muhdkashif » Tue Apr 20, 2010 7:26 am

Sorry for late reply,
Let me know from where this function will call.
Thanks in advance.
muhdkashif
 
Posts: 3
Joined: Mon Sep 28, 2009 12:31 pm


Return to Questions regarding other scripts at www.dhtmlgoodies.com

Who is online

Users browsing this forum: No registered users and 4 guests

cron