jquery loading javascript file on dropdown change in the page
basically what i am trying to do i have 2 div which are hidden plus a dropdown which will hide or show the particular div based on the selection criteria.What I have not achieve is that div1 should have English calender and div2 should have Arabic calender on the same page preloaded. So to achieve this how can i load the particular java script files in the page header on the dropdown change?开发者_开发问答
Edit:
Can we unload the script as well?
To load javascript file in response to dropdown change event you can use jQuery.getScript
$("#your_dropdown").change(function() {
$.getScript('some_url_for_script_file.js');
})
精彩评论