Answer the question
In order to leave comments, you need to log in
How to change behavior of jquery ui dialog using jquery?
Good afternoon, I use Yii for development, such a stone hit my teeth:
I used the CJuiDialog widget (generates dialog from jquery ui). For deployment, I used the articles:
belyakov.su/yii-ispolzovanie-cjuidialog-dlya-sozda... and loco.ru/materials/321-yii-cjuidialog-dlya-sozdaniy... . . But it remained inconsistent there (
The message from the modal is sent, Thanks for sending also opens in the same modal window. There was a nuisance. When you click on the cross in the treasured upper right, nothing happens, there is no error in the console, the window just does not close. I tried it in the file java script write the following command:
// refer to the cross
$('.ui-dialog > .ui-dialog-titlebar > a').click(function(){
alert('123');
$('.ui-widget-overlay, .ui-dialog').css({'display':'none'});
});
Even if I just write alert in a function for an event, then it does not work either on .ui-dialog or on its descendants, only if the descendant has some given id.
for example
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id' => 'mydialog',
'options' => array(
'title' => 'Отправить сообщение',
'autoOpen' => false,
'modal' => true,
'resizable'=> false,
'closeOnEscape' => false,
),
));
Answer the question
In order to leave comments, you need to log in
I made a mess like this:
$('#mydialog').click(function(){
$('#mydialog').parent().attr('id', 'boom');
$('#mydialog').siblings().attr('id', 'llllllloooollllll');
$('#mydialog').siblings().children('a').attr('id', 'exit_go');
$('#exit_go').click(function(){
$('.ui-widget-overlay, .ui-dialog').css({'display':'none'});
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question