190 // Click on a link into the popup "link to" or other dropdown that ask to close drop down on element click, so close dropdown
191 $(".dropdowncloseonclick").on(\'click\', function () {
192 console.log("Link has class dropdowncloseonclick, so we close/hide the popup ul");
193 //$(this).parent().parent().hide(); // $(this).parent().parent() is ul
194 $(this).parent().parent().removeClass("open"); // $(this).parent().parent() is ul
195 });
196
197 // Click outside of any dropdown
198 $(document).bind(\'click\', function (e) {
199 var $clicked = $(e.target); // This is element we click on
200 if (!$clicked.parents().hasClass("dropdown")) {
201 //console.log("close dropdown dd ul - we click outside");
202 //$(".dropdown dd ul").hide();
203 $(".dropdown dd ul").removeClass("open");
204
205 if ($("input:hidden[name=formfilteraction]").val() == "listafterchangingselectedfields") {
206 console.log("resubmit form saved into lastopendropdown after clicking outside of dropdown and having change selectlist from selectlist field of hamburger dropdown");
254 console.log("We click on tag with .reposition class. this.ref is now "+this.href);
255 }
256 else
257 {
258 console.log("We click on tag with .reposition class but element is not an <a> html tag, so we try to update input form field with name=page_y with value "+page_y);