{"id":8010,"date":"2015-11-20T05:43:52","date_gmt":"2015-11-20T05:43:52","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/20\/how-to-use-jquery-plugin-semantic-ui-in-angularjs-directive-open-source-projects-semantic-org-semantic-ui\/"},"modified":"2022-08-30T15:42:26","modified_gmt":"2022-08-30T15:42:26","slug":"how-to-use-jquery-plugin-semantic-ui-in-angularjs-directive-open-source-projects-semantic-org-semantic-ui","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/20\/how-to-use-jquery-plugin-semantic-ui-in-angularjs-directive-open-source-projects-semantic-org-semantic-ui\/","title":{"rendered":"how to use jQuery plugin (semantic-ui) in angularJS directive?-open source projects Semantic-Org\/Semantic-UI"},"content":{"rendered":"<p><em>I use semantic-ui in my project, the pulgin is checkbox someone say if use jQ plugin, you must use it in angular directive<\/em><\/p>\n<p><em>But It doesn&#8217;t work<\/em><\/p>\n<p><strong>the checkbox of semantic-ui setting in semantic-ui API document, you must set this to init checkbox<\/strong><\/p>\n<pre><code>$('.ui.checkbox').checkbox();\n<\/code><\/pre>\n<p>I try to change it to angular like this:<\/p>\n<p><strong>app.html<\/strong><\/p>\n<pre><code>\n  \n    \n    \n  \n\n<\/code><\/pre>\n<p><strong>and this is directive in angular js-file<\/strong><\/p>\n<pre><code>todoApp.directive('todoCheckbox', function() {\n  return {\n    restrict: 'A',\n    link: function(scope, elem, attrs) {\n      $(elem).checkbox();\n    }\n  };\n});\n<\/code><\/pre>\n<p>but it doesn&#8217;t work in my project why?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use semantic-ui in my project, the pulgin is checkbox someone say if use jQ plugin, you must use it in angular directive But It doesn&#8217;t work the checkbox of semantic-ui setting in semantic-ui API document, you must set this to init checkbox $(&#8216;.ui.checkbox&#8217;).checkbox(); I try to change it to angular like this: app.html and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[],"class_list":["post-8010","post","type-post","status-publish","format-standard","hentry","category-semantic","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8010"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8010\/revisions"}],"predecessor-version":[{"id":8700,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8010\/revisions\/8700"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}