开发者

How to Hide and Show the ComponentArt Slider inside the div in ASP.net

开发者 https://www.devze.com 2023-03-04 10:11 出处:网络
The componentart slider is given in div ,when we click the button outside of the div , the div will show and hide the componentart slider(this is the concept)..i tried many javascripts and jquery but

The componentart slider is given in div ,when we click the button outside of the div , the div will show and hide the componentart slider(this is the concept)..i tried many javascripts and jquery but i got some errors in sliders...

In this URL(http://aspnetajax.componentart.com/control-specific/scheduler/features/core_features/WebForm1.aspx)->this is i want

but i got some errors in slider..

(my error is when we click show/hide button the slider will collapsed)

<------this is my tried code---------->

function toggle(id) {
        var state = document.getElementById(id).style.display;
            if (state == '') {
                document.getElementById(id).style.display = 'none';
            } else {
                document.getElementById(id).style.display = '';
            }
        }
    function onloadDivScheduler()
    {

     document.getEleme开发者_开发问答ntById('divScheduler').style.display = 'none'; 
    }    
</script>

<----------------------> <------HTMl---------->

 <div id="main">
 <a href="#" onclick="toggle('divScheduler');">Settings</a>
  </div>
 <div id="hidden"> "My content (componentart slider)"
</div>

<---------------------->

give me the solutions...

Thanks in advance....

<----------------------------------> Now i got partial output form this code...

<script type="text/javascript">
        function toggle(id) {
            var state = document.getElementById(id).style.display;
                if (state == 'block') {
                    document.getElementById(id).style.display = 'none';
                } else {
                    document.getElementById(id).style.display = 'block';
                }
            }
    </script>


 <div id="main"> <a href="#" onclick="toggle('hidden');">Settings</a>
 </div>
 <div id="hidden"> ("content")</div>

then now i want hide my div when page appears but in this code the div is shown the div content when page starts ...

will u give the sample for hide the div when page starts and when we click the button it show the div...


function toggleDiv(divName){
   $("#"+divName).toggle();
}

<a href="#" onclick="toggleDiv('hidden');">Settings</a>

why is this marked down..

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号