DUBAI
World Government Summit 2023-2024
RIYADH, SAUDI ARABIA
Terhal, by Dragone
RIYADH, SAUDI ARABIA
Gallery Design at
Saudi Design Festival
DUBAI
Dubai World Cup
RIYADH, SAUDI ARABIA
The Portal –
Area 15
DUBAI
Dubai Watch Week 2023
ABU DHABI
Hyperound
K-Fest
DUBAI
Beautyworld Middle East 2023
DUBAI
Emirates Airlines Dubai Rugby7s
BAHRAIN
BLAST Pro Series
ABU DHABI
Inaugration of “Louvre Abu Dhabi”
DUBAI
Performance Venues EXPO 2020
DUBAI
German Stories  Book Fair
DUBAI
Dubai World Cup After-Race Concert
DUBAI
Takashi Murakami Exhibit
DUBAI
Bla Bla Opening Show
EXPO 2020 DUBAI
Sport Arena
DUBAI
Museum of The Future
DUBAI
Michele Lamy Exhibition
DUBAI
‘Do Arabs Dream of Electric Sheep?’ at ICD Brookfield Place
ABU DHABI
WPT Modon Abu Dhabi Padel Master
EXPO 2020 DUBAI
Festival Garden
DUBAI
International Participants Meeting EXPO 2020
DUBAI
Insideout – Multimedia Installation
DUBAI
Hamdan Bin Mohammed Program for Smart Government Awards
DUBAI
44th National Day
DUBAI
EMAAR New Year’s Eve Show
DUBAI
The Edge of Government
DUBAI
“Nu Skin” Gala Dinner Show
var activeClasses = [];
jQuery(function() {
jQuery('.dv-dropdown .df-button').on('click', function() {
// get number of dropdown
var dvIndex = jQuery(this).closest(".dv-dropdown").index(".dv-dropdown");
// if active classes are defined
if (activeClasses[dvIndex] != "") {
// remove active classes
jQuery('.dv-dropdown:not(:eq(' + dvIndex + ')) .df-button').each(function() {
jQuery(this).removeClass(activeClasses[dvIndex]);
});
// empty active classes array
activeClasses[dvIndex] = "";
}
// get button classes
var filterClasses = jQuery(this).attr('class').split(/\s+/);
// for each filter class, remove the one not starting with dfc-
filterClasses = jQuery.grep(filterClasses, function(element) {
return element.indexOf("dfc-") === 0;
});
// remove all other active classes from button
jQuery.each(activeClasses, function( index, value ) {
// remove active classes from other dropdowns
if(index !== dvIndex) {
filterClasses = filterClasses.filter(e => e !== activeClasses[index]);
}
});
// undefined if you click on all, because no class then just remove
if (filterClasses[0] != undefined) {
activeClasses[dvIndex] = filterClasses[0];
jQuery('.dv-dropdown:not(:eq(' + dvIndex + ')) .df-button').each(function() {
jQuery(this).addClass(activeClasses[dvIndex]);
});
}
// add active button class dv-activebutton
jQuery.each(activeClasses, function( index, value ) {
// remove classes
jQuery(".dv-dropdown:eq(" + index + ") .df-button").removeClass("dv-activebutton");
// add it to active element
if(value !== "" && typeof value !== 'undefined') {
jQuery(".dv-dropdown:eq(" + index + ") .df-button." + value).addClass("dv-activebutton");
}
else {
jQuery(".dv-dropdown:eq(" + index + ") .df-button.dv-all").addClass("dv-activebutton");
}
});
// Sort the items in each dropdown based on the rank class
jQuery('.dv-dropdown').each(function() {
var buttons = jQuery(this).find('.df-button');
buttons.sort(function(a, b) {
var rankA = getRankFromClass(jQuery(a).attr('class'));
var rankB = getRankFromClass(jQuery(b).attr('class'));
return rankB - rankA; // Sort by rank, higher first
});
// Re-append sorted buttons
jQuery(this).append(buttons);
});
});
// Helper function to extract the rank from the class (e.g., 'rank-5' -> 5)
function getRankFromClass(classString) {
var rankClass = classString.split(/\s+/).find(function(cls) {
return cls.indexOf('rank-') === 0;
});
// Extract the number from the 'rank-x' class
return rankClass ? parseInt(rankClass.replace('rank-', ''), 10) : 0;
}
});