search

Home  >  Q&A  >  body text

angular.js - Can angular be used normally after introducing jquery?

As shown in the figure, the jquery file and a test file are introduced into the index of the angular project (these two files can be run in non-angular projects) $( document).ready(function(){
        console.log("LX");
    $(".team").hover(function(){
        console.log("T");
    $(".shadow").css("display","block")
    },function(){$(".shadow").css("display","none")});
    });
This is the code in jqueryShow.js. The console can display the two letters LX, but the subsequent code cannot work. How to solve this problem?
天蓬老师天蓬老师2822 days ago569

reply all(1)I'll reply

  • 为情所困

    为情所困2017-05-15 17:03:36

    There is absolutely no problem with angularJS referencing jQuery. You can see it in the angular.js file. After angularJS is started, it will look for whether an external jQuery is referenced. If an external jQuery is referenced, the external one is used. It could be other issues.

    reply
    0
  • Cancelreply