/    Sign up×
Community /Pin to ProfileBookmark

Translate this code

Can someone help me with this code:

[code=html]var dlg = $(‘#dlgProperties’);
dlg.dialog({
bgiframe: true,
autoOpen: false,
modal: true,
title: TitleCertificationProperties,
width: 600,
buttons: buttons,
close: function() {
$(‘input, textarea, select’, dlg).val(”);
$(this).dialog(‘destroy’);
}
});[/code]

What this is mean?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@pactor21Oct 10.2011 — From the look of the first glance, it looks like you're using some jQuery plugin, and I'm guessing it opens an modal window which has an iframe in it with some title sent from the plugin and also with width of 600px.

I just can't say the detail about what the plug-in triggers unless you show us how the plug-in is defined.
Copy linkTweet thisAlerts:
@BulgarianauthorOct 10.2011 — Yes, this must to be properties of pop-up window in context menu. But what is

var dlg = $('#dlgProperties');

In .css file I have
[code=html]#dlgProperties select
{
width: 202px;
}

#dlgProperties fieldset
{
margin: 0em 0;
padding: 0 1em 0.5em 1em;
border: 1px solid #CCC;
}[/code]


So, I want to make other popup like this, but I can't.. Add it in .css and make it in .js files, but nothing...
Copy linkTweet thisAlerts:
@KorOct 10.2011 — But what is

var dlg = $('#dlgProperties');[/QUOTE]

It is the reference of the DOM Element with the id="dlgProperties". The JQuery syntax for the equivalent native JavaScript:
<i>
</i>var dlg = document.getElementById('dlgProperties');

Before using JQuery you should first learn JavaScript and then the JQuery custom syntax.
×

Success!

Help @Bulgarian spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...