define([ 'dojo/_base/declare', 'dojo/_base/lang', 'dojo/_base/html', "dojo/topic", "dojo/dom", 'dijit/_WidgetBase', 'dijit/_TemplatedMixin', "dojo/text!./GeologicalDisasterPanel.html" ], function( declare, lang, html, topic, dom, _WidgetBase, _TemplatedMixin, template ) { return declare('GeologicalDisasterPanel', [_WidgetBase, _TemplatedMixin], { templateString: template, width: 270, constructor: function(args) { declare.safeMixin(this, args); }, postCreate: function () { this.inherited(arguments); // this.name.innerHTML = this.data.name||"--"; // $(this.domNode).find('#oo').html('3333333333'); $(this.domNode).find(".tab li").click(function(){ $(this).parent(".tab").children("li").eq($(this).index()).addClass("activ").siblings().removeClass("activ"); $(this).parent(".tab").next(".tabCon").children("div").hide().eq($(this).index()).show(); }) $(this.domNode).find("#i1").attr('src', "widgets/Introduction/"+this.data.img); $(this.domNode).find("#js").html(this.data.content); if(this.data.qjdz){ $(this.domNode).find("#qj").attr('src', this.data.qjdz); } else{ $(this.domNode).find("#qjLi").css('display', "none"); $(this.domNode).find("#qjDiv").css('display', "none"); } if(this.data.audio){ $(this.domNode).find("#bgMusic").attr('src',"widgets/Introduction/" + this.data.audio); } else{ $(this.domNode).find("#bgMusic").css('display', "none"); } } }); });