有多个 jqwidget 选项卡问题

having more than one jqwidget tab issue

本文关键字:问题 选项 jqwidget      更新时间:2023-09-26

我的HEAD部分有以下内容。 第二个,jqxTabsExam,除非我删除第一个,jqxTabsExam,否则不起作用,然后第一个显然不起作用,所以这就是为什么我认为我没有在本节中正确激活它。 有什么想法吗?

<script type="text/javascript">
	
	
	
        $(document).ready(function () {
			
            // Create jqxTabsMain.
            $('#jqxTabsMain').jqxTabs({ width: '100%', position: 'top', animationType: 'fade', selectionTracker: true});
            $('#settings div').css('margi,n-top', '10px');
            $('#animation').jqxCheckBox({ theme: theme });
            $('#contentAnimation').jqxCheckBox({ theme: theme });
			
										$('#animation').on('change', function (event) {
											var checked = event.args.checked;
											$('#jqxTabsMain').jqxTabs({ selectionTracker: checked });
										
										});
			
			
						$('#contentAnimation').on('change', function (event) {
							var checked = event.args.checked;
							if (checked) {
								$('#jqxTabsMain').jqxTabs({ animationType: 'fade' });
							}
							else {
								$('#jqxTabsMain').jqxTabs({ animationType: 'none' });
							}
						});
						
                //done with first tab 
						
			
			
		       // Create jqxTabsExam.
            $('#jqxTabsExam').jqxTabs({ width: '100%', position: 'top', animationType: 'fade', selectionTracker: true});
            $('#settings div').css('margi,n-top', '10px');
            $('#animationExam').jqxCheckBox({ theme: theme });
            $('#contentAnimationExam').jqxCheckBox({ theme: theme });
			
						   $('#animationExam').on('change', function (event) {
								var checked = event.args.checked;
								$('#jqxTabsExam').jqxTabs({ selectionTracker: checked });
							
							});
			
			
			
													
										$('#contentAnimationExam').on('change', function (event) {
											var checked = event.args.checked;
											if (checked) {
												$('#jqxTabsExam').jqxTabs({ animationType: 'fade' });
											}
											else {
												$('#jqxTabsExam').jqxTabs({ animationType: 'none' });
											}
										});
  
            //done with second tab 
			
          	
			
        });
    </script>

第二个不起作用,除非我在函数中删除第一个,jqxTabsExam。

您可以查看选项卡集成以查看如何使用jQWidgets Tabs小部件在选项卡内添加小部件。