jquery colorbox close affecting overlapping dialogs? -
i'm in process of replacing generic alerts on page colorbox treatment. i'm using hidden divs , href
reference build dialogs user interaction along these lines:
$.colorbox({ inline: true, open: true, href: "#modalalert", /*id of hidden div*/ onclosed: function () { $("#modalalert").hide(); }, onopen: function () { $("#modalalert").show(); }, closebutton: false });
i use similar bit of code show dialog gather input data. want put bit of validation checking on input data. in method i'm using data issue $.colorbox.close()
dismiss input box. if validation fails, show alert message indicate issue is. when try call method build above listed colorbox alert, nothing shows. know code being executed, expected alert not appear.
when debug code, see $.colorbox.close()
execute, input box still visible. it appears doesn't kill box until somewhere later in method. seems me killing alert, making seem never showed up. there way $.colorbox.close()
@ top of method execute (and kill input box) when subsequent alert built, shows?
i'm still new ways of colorbox, i'm open alternatives. code i'm working embedded in angular, extracting full working sample take bit of work. input.
i found better way of addressing situation, rather trying pop separate alert. instead, put message dialog that's open. works , better ux.
Comments
Post a Comment