Skip to main content

Posts

Showing posts from 2009

New Function disableToggle to toggle disable on and off

New Function disableToggle to toggle disable on and off similar to slideToggle /********************* Function:disableToggle author:Mukesh License: Void of any license **********************/ $.fn.disableToggle = function() { if(($(this).attr("disabled")=="disabled") ($(this).attr("disabled")==true)) { $(this).removeAttr("disabled"); } else { $(this).attr("disabled","disabled"); } }; This function can be called as $("#element-id").disableToggle(); where element_id is the id of the element. For e.g., $("#edit-name").disableToggle();

Callback function to run after any specific ajax request that is predefined

Whenever any homework needs to be done after any ajax request has been loaded then this approach can be utilized. For e.g. whenever any title of table derived from liberation_make_table is clicked for sorting the columns then an ajax request is made. So if the table is loaded in div with id "maketable-1" Then suppose some steps are to carried out after ajax request is loaded onto that table. An alert needs to be displayed when the ajax request is completed Then this section can be added: $("#maketable-1").ajaxComplete(function(event,request, settings){ alert("hello"); });

Preparing for IELTS... the whole lot of english

Giving the IELTS exam is a nightmare coming true to me. After so much turmoil i have been facing in the past few days during job, i do manage to get Saturday and Sunday off to prepare for it. I have never been such an huge English language fan but due to some requirements for entering into universities i do have to prepare for that. Tough i manage to get two days they are also spent in watching movies or going out with my brother (who just arrived from us and is spending his vacation) and if possible i get along with friends who are also preparing for the same stuff. Maybe someday after finishing the UK MBA we come out and may be known to be like the British gentlemen of high caliber. UK has been known for its gentle and subtle behaviour. I would also like to adapt some of these features within me