0

Have a problem with formatting table for EmberJS. Clear table is nice with all necessary CSS formatting, but when I add

<script type="text/x-handlebars"></script> 

for Ember output formatting seems to be ignored.

Also, inside those script-tags JS and jQuery selectors don't work neither.

Why this can happened? And how to make it work as needed? Source here: source at jsfiddle

0

1 Answer 1

2

I guess you have to place your mainDiv inside the <script> tags. Otherwise since ember generates by default a div for it's generated view's you get an additional div nesting an thus your css styles are not applied correctly.

I've just changed this in the jsfiddle, you provided and it seams to work, at least the css styles are applied, see here.

Hope it helps

Edit: see here your modified jsfiddle mentioned in the comments on how to handle events with ember.

Sign up to request clarification or add additional context in comments.

8 Comments

Yeah, it makes easier for css, but jquery can't select items now, see here
well, since you are using ember.js you should let it also handle events for you instead of using the plain jQuery syntax...
I've edited my answer, please have a look on how to handle events with ember instead of with plain jQuery
Great! It works as needed. And one more question, I can add classes, for example, using native JS or can use jquery methods inside Ember events?
And another question appeared...how can I find current item, would it be a button or a row in a table, I was trying "this" and "$(this)" in your scenario, but it returned "undefined" all the time.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.