angularify / angular-semantic-ui

[WiP] AngularJS native directives for Semantic UI
http://angularify.github.io/angular-semantic-ui
MIT License
383 stars 89 forks source link

Add styled and animation to accordion #28

Closed kevspadillo closed 9 years ago

kevspadillo commented 9 years ago
// <accordion styled></accordion>
if(typeof attrs.styled  !== 'undefined') {
    element.addClass('styled');
}

Added styled attribute to display accordion with border

template: "<div class=\"ui accordion\">\

to

 template: "<div class=\"ui\">\

Removed accordion class selector to display grouped accordions

jspdown commented 9 years ago

@kevspadilla: I got an error when I clicked a second time on the same tab:

TypeError: undefined is not a function
    at n.scope.click_on_accordion_tab (src/accordion/accordion.js:120:36)
    at ib.functionCall (bower_components/angular/angular.min.js:199:303)
    at Ec.(anonymous function).compile.d.on.f (bower_components/angular/angular.min.js:216:74)
    at n.$get.n.$eval (bower_components/angular/angular.min.js:126:15)
    at n.$get.n.$apply (bower_components/angular/angular.min.js:126:241)
    at HTMLDivElement.<anonymous> (bower_components/angular/angular.min.js:216:126)
    at HTMLDivElement.c (bower_components/angular/angular.min.js:32:389)
kevspadillo commented 9 years ago

Hi! @jspdown , Error message doesn't show in mine. It seems there's an error regarding this line of code.

// Add animation to the accordion group content
element.children().last().slideToggle();

Please see this fiddle... http://jsfiddle.net/kevs017/3dvg6Lkf/2/

jspdown commented 9 years ago

@kevspadilla, I'm sorry, something wrong happened when I checkout your commit. It works now. Thanks for your PR :wink:

kevspadillo commented 9 years ago

Your very much welcome!