I'm and trying to run jQuery from the .hbs file, which works by putting the handlebars in the file. But, then the text '[object Object]' is placed into my HTML as text. What can I change so that the jQuery still runs but does not place '[object Object]' in the HTML?
app.js below
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import $ from 'jquery';
export default Controller.extend({
NavIsViewable: true,
fixedMenu: computed(function(){
return $(".navbar").width($(".disable-listing-style").width());
})
});
app.hbs below
<div id="nav" class="nav">
</div>
Aucun commentaire:
Enregistrer un commentaire