dojo 에서 jquery 사용 하기

1055 단어 jquery
dojo/query 는 사용 하기 어렵 습 니 다.jquery 로 dom 조 회 를 하고 싶 습 니 다.열 은 다음 과 같 습 니 다.jquery 의 경 로 를 주의 하 시 면 됩 니 다.
 
 
<script type="text/javascript"
  src="https://ajax.googleapis.com/ajax/libs/dojo/1.7.0/dojo/dojo.js"
  data-dojo-config="async: true, packages: [
    { name: 'jquery', location: 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1', 
      main: 'jquery' }
    ]">
</script>

The second step is to modify our source code to add the actual loading of jQuery through the require function: 
 
<script type="text/javascript">
  define.amd.jQuery = true;
  require(["jquery", "dojo/query", "dojo/NodeList-dom"], function(jquery, $){
    $("output").style("visibility", "visible");
    jquery("#output").css("visibility", "hidden");
  });
</script>

 
 
 

좋은 웹페이지 즐겨찾기