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

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]

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

verrell123

verrell123
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/

ankillien

ankillien
Administrator
Administrator
Hi,

Here is a tutorial about it...
http://www.webartzforum.com/tutorials-f7/making-show-hide-content-t903.htm

verrell123

verrell123
Registered Member
Registered Member
ankillien wrote:Hi,

Here is a tutorial about it...
http://www.webartzforum.com/tutorials-f7/making-show-hide-content-t903.htm
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/

ankillien

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

verrell123

verrell123
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/

ankillien

ankillien
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>

verrell123

verrell123
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/

ankillien

ankillien
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.

verrell123

verrell123
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/

ankillien

ankillien
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>

verrell123

verrell123
Registered Member
Registered Member
Its PERFECT Thanks Ankillien!

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

Joel

Joel
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