Q1. How To Call Hook Into Dialog Close Event In Jquery Ui?
$(‘div#contentId’).on(‘dialogclose’, function(event)
{
//console.log(‘closed event called’);
}
);
Q2. Can We Use Another Variable Instead Of $ In Jquery? If Yes, How?
Yes, we can.
var jQ = jQuery.noConflict();
/** Now use jQ instead of $ **/
jQ( “div#pid” ).hide();
Q3. How To Set Year In Datepicker?
$(“.datepickerClass”).datepicker(
{
yearRange: ‘1950:2013’,
changeMonth: true,
changeYear: true,
showButtonPanel: true,
}
);
Q4. What Is Current Stable Version Of Jquery Ui?
1.11.4 / dated 11 March 2015
Q5. How To Remove Jquery Ui Autocomplete Helper Text?
.ui-helper-hidden-accessible { display:none; }
Q6. How Do I Disable A Jquery-ui Draggable Of Widget?
//myObject is widget object.
myObject.draggable( ‘disable’ );
OR, you can set during the initalization
$(“#yourDialogId”).dialog({
draggable: false
});
Q7. In Which Language, Jquery Ui Is Written?
JavaScript
Q8. How To Call A Dragable Widget?
// Make #draggable draggable
$(function ()
{
$(“#draggableDivId”).draggable();
}
);
Q9. How To “change Button Text” In Jquery?
jQuery Version < 1.6
$(“#elementId”).attr(‘value’, ‘Save’); //versions older than 1.6
jQuery Version > 1.6
$(“#elementId”).prop(‘value’, ‘Save’); //versions newer than 1.6
Q10. How Can I Disable A Button In A Jquery ?
$(‘#divId’).attr(“disabled”, true);
Q11. How To Change Date Format In Jquery Ui Datepicker?
var date = $(‘#datepickerDivId’).datepicker
(
{ dateFormat: ‘dd-mm-yy’
}
).
val();
Q12. How To Add Css Property On Last Div?
$(‘div:last’).css({backgroundColor: ‘green’, fontWeight: ‘bolder’});
Q13. How To Download Jquery Ui Css From Google’s Cdn?
Uncompressed: http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.js
Compressed: http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
Q14. What Is Jquery Ui?
It is JavaScript Library which is collection of jQuery widgets like datepicker, tabs, autocomplete etc. We can also add effects, interactions (drag, drop, resize) on widgets.
Q15. How To Set Current Date In Date Picker?
$(“.datepickerClass”).datepicker(‘setDate’, new Date());
Q16. What Widets Are Available In Jquery Ui?
- Accordion
- Autocomplete
- Button
- Datepicker
- Dialog
- Menu
- Progressbar
- Selectmenu
- Slider
- Spinner
- Tabs
- Tooltip
Q17. What Is $.noconflict()?
When we call to $.noConflict(). Old references of $ are saved during jQuery initialization, noConflict() simply restores them.
Q18. How To Remove Close Button On The Jquery Ui Dialog Using Javascript?
$(“#div2”).dialog(
{
closeOnEscape: false,
open: function(event, ui)
{
$(“.ui-dialog-titlebar-close”, ui.dialog | ui).hide();
}
}
);
Q19. How To Remove Close Button On The Jquery Ui Dialog Using Css?
.ui-dialog-titlebar-close
{
visibility: hidden;
}
Q20. Is Jquery Ui Opensource?
Yes.
Q21. What Are Different Effects Available In Jquery Ui?
- Add Class
- Color Animation
- Easing
- Effect
- Hide
- Remove Class
- Show
- Switch Class
- Toggle
- Toggle Class
Q22. How Do I Keep Jquery Ui Accordion Collapsed By Default?
$(“#divId”).accordion
(
{
header: “h4”, collapsible: true, active: false
}
);
Q23. How To Initialize A Dialog Without A Title Bar?
var dialogOpts=[]
$(“#divId”).dialog(dialogOpts);
//Remove the title bar
$(“.ui-dialog-titlebar”).hide();
