Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function ($) {
- Drupal.behaviors.watfaq = {
- attach: function(context, settings) {
- $("#type").change(function() {
- var valeur = jQuery("#type").val(); //valeur renvoyee par le select
- jQuery.ajax({
- url : Drupal.settings.basePath + 'FAQ/' + valeur + '/ajaxsearch',
- success : function(data) {
- jQuery("#accordion").fadeOut(0, function(){
- jQuery("#accordion").accordion('destroy');
- jQuery('#accordion').html('<h3><a href="#">' + data[0].title + '</a></h3><div><p>' + data[0].value + "</p></div>");
- jQuery("#accordion").accordion({ clearStyle: true });
- //on la ré-affiche avec un effet de transparence
- jQuery("#accordion").fadeIn(1000);
- });
- }
- });
- });
- }
- };
- }(jQuery));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement