2016-12-06 70 views
0

工作,我有一個創建以下HTML jQuery插件引導數據切換不燼組件

<div class="panel-heading"> 
    <h4 class=""> 
    <a data-toggle="collapse" href="#collapse2" class="collapsible-title display-inline full-width bold">Select Gigs</a> 
    </h4> 
</div> 
<div id="collapse2" class="panel-collapse collapse"> 
    <div class="panel-body"> 
    <div class="row"> 
     <div class="col-xs-12"> 
     <input type="text" class="input-text-field margin-medium-bottom" placeholder="Search" /> 
     </div> 
    </div> 
...... and some other divs here ..... 

我想切換的div id爲collapse2當點擊<a></a>它上面。如果我在hbs文件中添加html,它工作正常。但是,當我創建上面的HTML內jQuery和插入到DOM如下改變它的URL domain/#collapse2

_initializeAutoComplete: function() { 
     Ember.$('#' + this.get('divId')).setAutocomplete({ 
      data: this.get('dataTree'), 
      multiSelect: true, 
      selectingType: 3 
     }); 

    }.on('didInsertElement') 
}); 

我怎樣才能讓所述反覆工作,而燼將HREF的URL變化? 感謝任何幫助。

回答

0

移動引導屬性上述股利(或H4或創建新的作爲您的需要)

<div class="panel-heading" data-toggle="collapse" href="#collapse2" class="collapsible-title display-inline full-width bold"> 
    <h4 class=""> 
    <a href="#">Select Gigs</a> 
    </h4> 
</div>