Re: CuteEditor 6.7 & jQuery Tabs

  •  07-07-2014, 11:27 AM

    Re: CuteEditor 6.7 & jQuery Tabs

    Hi,

     

    Please try the new one below, it should work under IE11 too.

     

    1. <%@ Page Language="C#" %>    
    2.     
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>    
    4. <!DOCTYPE html>    
    5. <html xmlns="http://www.w3.org/1999/xhtml">    
    6. <head id="Head1" runat="server">    
    7.     <title></title>    
    8.     
    9. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>    
    10.     
    11.     <script type="text/javascript">    
    12.         $(document).ready(function () {    
    13.             $('.tabs a').click(function () {    
    14.                 switch_tabs($(this));    
    15.             });    
    16.             switch_tabs($('.defaulttab'));    
    17.         });    
    18.     
    19.         function switch_tabs(obj) {    
    20.             $('.tab-content').hide();    
    21.             $('.tabs a').removeClass("selected");    
    22.             var id = obj.attr("rel");    
    23.             $('#' + id).show();    
    24.             obj.addClass("selected");    
    25.         }    
    26.     </script>    
    27.     
    28. </head>    
    29. <body>    
    30.     <form id="form1" runat="server">    
    31.         <div id="wrapper">    
    32.             <ul class="tabs">    
    33.                 <li><a href="#" class="defaulttab" rel="tabs1">Tab #1</a></li>    
    34.                 <li><a href="#" rel="tabs2">Tab #2</a></li>    
    35.             </ul>    
    36.             <div class="tab-content" id="tabs1">    
    37.                 <CE:Editor ID="editor1" runat="server" Text="editor1">    
    38.                 </CE:Editor>    
    39.             </div>    
    40.             <div class="tab-content" id="tabs2">    
    41.                 <CE:Editor ID="editor2" runat="server" Text="editor2">    
    42.                 </CE:Editor>    
    43.             </div>    
    44.         </div>    
    45.     </form>    
    46. </body>    
    47. </html>    
    48. <script type="text/javascript">  
    49. function CuteEditor_OnInitialized(editor)  
    50. {  
    51.   setTimeout(setHeight,200);  
    52. }  
    53. function setHeight()  
    54. {  
    55.     var editor1=document.getElementById("<%= editor1.ClientID %>");  
    56.     var editor2=document.getElementById("<%= editor2.ClientID %>");  
    57.     editor1.SetHeight(1000);  
    58.     editor2.SetHeight(1000);  
    59. }  
    60. </script>  
     

    Regards,

     

    Ken 

View Complete Thread