WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Click for Show it then click for hide it on Sat Oct 16, 2010 8:24 am

verrell123

avatar
Registered Member
Registered Member
how to make a text when it click will show some other text and it will be hide when it click again?
can anybody help me?

http://www.freshartz.co.cc/

2 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 11:05 am

ankillien

avatar
Administrator
Administrator

3 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 11:38 am

verrell123

avatar
Registered Member
Registered Member
No, i mean not that. when "text" been click it will show on above the text ( i want to use cbox to show it)

http://www.freshartz.co.cc/

4 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 3:27 pm

ankillien

avatar
Administrator
Administrator
Can you show an example of what exactly you are looking for?

5 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 3:34 pm

verrell123

avatar
Registered Member
Registered Member
CLICK ME

when someone click the "CLICK ME" it will be show this code
Code:

<!-- BEGIN CBOX - www.cbox.ws - v001 -->
<div id="cboxdiv" style="text-align: center; line-height: 0">
<div><iframe frameborder="0" width="200" height="305" src="http://www2.cbox.ws/box/?boxid=2087386&amp;boxtag=w0b0fq&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#ababab 1px solid;" id="cboxmain"></iframe></div>
<div><iframe frameborder="0" width="200" height="75" src="http://www2.cbox.ws/box/?boxid=2087386&amp;boxtag=w0b0fq&amp;sec=form" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#ababab 1px solid;border-top:0px" id="cboxform"></iframe></div>
</div>
<!-- END CBOX -->
But when we click "CLICK ME" again this box will be hide.

http://www.freshartz.co.cc/

6 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 3:49 pm

ankillien

avatar
Administrator
Administrator
Ok, you can use this code instead of the above one...

Code:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script><script type="text/javascript">jQuery.noConflict();jQuery(document).ready(function(){jQuery("div#cboxdiv").hide(0); jQuery("a.show-hide").click(function(){jQuery("div#cboxdiv").toggle(0);});});</script>
<center><a href="#" class="show-hide">Show/Hide cBox</a></center>
<div id="cboxdiv" style="text-align: center; line-height: 0">
<div><iframe frameborder="0" width="200" height="305" src="http://www2.cbox.ws/box/?boxid=2087386&amp;boxtag=w0b0fq&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#ababab 1px solid;" id="cboxmain"></iframe></div>
<div><iframe frameborder="0" width="200" height="75" src="http://www2.cbox.ws/box/?boxid=2087386&amp;boxtag=w0b0fq&amp;sec=form" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#ababab 1px solid;border-top:0px" id="cboxform"></iframe></div>
</div>

7 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 4:05 pm

verrell123

avatar
Registered Member
Registered Member
It use but i use some code need this
Code:

 <a class="cbox" href="#">Text</a>
But in your code already been add
Code:

<a href="#" class="show-hide">Show/Hide cBox</a>

How to add it?

http://www.freshartz.co.cc/

8 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 4:48 pm

ankillien

avatar
Administrator
Administrator
You mean, you wanna change the text?
<a href="#" class="show-hide">Show/Hide cBox</a>

You can change the bolded part in above code.

9 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 5:12 pm

verrell123

avatar
Registered Member
Registered Member
No, i mean i need the class text was like this

<a class="cbox" href="#">Text</a>
but you use

<a href="#" class="show-hide">Show/Hide cBox</a>
So how?

http://www.freshartz.co.cc/

10 Re: Click for Show it then click for hide it on Sat Oct 16, 2010 6:46 pm

ankillien

avatar
Administrator
Administrator
The class name I used is for the show/hide trigger only. It won't make any difference.

If you want, you can add your own class to it. Like this...

Code:
<a href="#" class="cbox show-hide">Show/Hide cBox</a>

11 Re: Click for Show it then click for hide it on Sun Oct 17, 2010 6:36 am

verrell123

avatar
Registered Member
Registered Member
Its PERFECT Thanks Ankillien!

http://www.freshartz.co.cc/

12 Re: Click for Show it then click for hide it on Sun Oct 17, 2010 11:56 am

Joel

avatar
Registered Member
Registered Member
Solved, Locked

http://www.advertisehotspot.info/

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum