(function ($) { // Ensure parent category is bold only if it has children $('.categorychecklist li').each(function () { var $this = $(this); if ($this.children('.children').length) { $this.children('label').css('font-weight', 'bold'); } }); // Collapsible subcategories $('.categorychecklist li').each(function () { if ($(this).children('.children').length) { $(this) .children('.children') .hide(); $(this) .children('label') .before( '[+] ' ); } }); $('.categorychecklist').on('click', 'a.toggle-subcategories', function (e) { e.preventDefault(); e.stopPropagation(); var $this = $(this); $this.parent() .children('.children') .slideToggle('fast', function () { $this.toggle(); $this.siblings('.toggle-subcategories').toggle(); }); }); // Auto-select parent categories when child is selected $('.categorychecklist').on('change', ':checkbox', function () { var $this = $(this); if ($this.is(':checked')) { // Check all parent categories $this.parents('li').children('input:checkbox').prop('checked', true); } else { // Uncheck child categories if parent is unchecked $this.closest('li').find('input:checkbox').prop('checked', false); } }); // Prevent default category from selecting unrelated categories $('.categorychecklist input[type="checkbox"]').on('change', function () { const defaultCategoryId = 1; // Replace with the ID of your default category (General Knowledge Mcqs) if ($(this).val() == defaultCategoryId) { if ($(this).is(':checked')) { // Uncheck all other categories $('.categorychecklist input[type="checkbox"]') .not(this) .prop('checked', false); // Clear 'Make Primary' for unrelated categories $('.categorychecklist li').each(function () { if ( $(this).find('input[type="checkbox"]').prop('checked') === false ) { $(this).find('.cat-item-action').remove(); } }); } } }); // Update 'Make Primary' visibility based on checked categories $('.categorychecklist input[type="checkbox"]').on('change', function () { const $parentLi = $(this).closest('li'); const isChecked = $(this).prop('checked'); if (isChecked) { $parentLi.find('.cat-item-action').show(); } else { $parentLi.find('.cat-item-action').remove(); } }); })(jQuery); {"id":329159,"date":"2022-07-09T10:14:34","date_gmt":"2022-07-09T05:14:34","guid":{"rendered":"https:\/\/pakmcqs.com\/?p=329159"},"modified":"2022-07-09T10:16:06","modified_gmt":"2022-07-09T05:16:06","slug":"who-is-nabih-berri","status":"publish","type":"post","link":"https:\/\/pakmcqs.com\/world-current-affairs-mcqs\/who-is-nabih-berri","title":{"rendered":"Who is Nabih Berri?"},"content":{"rendered":"
A. Prime Minister of Lebanon Submitted by: Waqar Ali<\/strong><\/p>\n <\/p>\n Veteran politician Nabih Berri has been reelected Lebanon\u2019s parliament speaker for the seventh time in a row, holding onto his record as the longest-serving head of a legislative assembly in the Arab world.<\/p>\n Berri, a member of Lebanon\u2019s Shia community, has maintained the position thanks to the 1989 Taif Agreement, which established a power-sharing deal among the country\u2019s largest religious sects, the Christians, Sunnis, and Shias.<\/p>\n Under the agreement, Christians hold the country\u2019s presidency, Sunnis take the prime ministry, while Shias get the parliament speakership.<\/p>\n","protected":false},"excerpt":{"rendered":" A. Prime Minister of Lebanon B. Speaker of the Parliament of Lebanon C. President of Lebanon D. None of these Submitted by: Waqar Ali<\/p>\n","protected":false},"author":22483,"featured_media":329547,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":{"0":"post-329159","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-world-current-affairs-mcqs"},"plaintext":"A. Prime Minister of Lebanon\nB. Speaker of the Parliament of Lebanon<\/strong>\nC. President of Lebanon\nD. None of these\nSubmitted by: Waqar Ali<\/strong>\n\nVeteran politician Nabih Berri has been reelected Lebanon\u2019s parliament speaker for the seventh time in a row, holding onto his record as the longest-serving head of a legislative assembly in the Arab world.\nBerri, a member of Lebanon\u2019s Shia community, has maintained the position thanks to the 1989 Taif Agreement, which established a power-sharing deal among the country\u2019s largest religious sects, the Christians, Sunnis, and Shias.\nUnder the agreement, Christians hold the country\u2019s presidency, Sunnis take the prime ministry, while Shias get the parliament speakership.\n","yoast_head":"\n
\nB. Speaker of the Parliament of Lebanon<\/strong>
\nC. President of Lebanon
\nD. None of these<\/p>\n