Created
July 3, 2012 16:10
-
-
Save domguard/3040742 to your computer and use it in GitHub Desktop.
Using django.jQuery with another jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
//console.log($.fn.jquery) // which jquery are we using ? | |
$(function(){ | |
$("select[name$='-etype']").each(function(){ | |
show_target_methods($(this)); | |
}); | |
$("select[name$='-etype']").bind("change",function(e){ | |
console.log($(this)); | |
show_target_methods($(this),true); | |
}); | |
}); | |
})((typeof window.jQuery == 'undefined' && typeof window.django != 'undefined') ? django.jQuery : jQuery); | |
// si jQuery 1.7 est pas encore chargé et que django.jQuery l'est, il prendra celui de django admin | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment