Override jQuery .val() function?

You can store a reference to the original val function, then override it and do your processing, and later invoke it with call, to use the right context: (function ($) { var originalVal = $.fn.val; $.fn.val = function(value) { if (typeof value != ‘undefined’) { // setter invoked, do processing } return originalVal.call(this, value); }; … Read more

(jquery) Blackout the entire screen and highlight a section of the page?

See example of the following here → No need for a plugin. This can be accomplished with very little jQuery code, showing a blackout overlay with the selected div at a z-index above it: $(‘.expose’).click(function(e){ $(this).css(‘z-index’,’99999′); $(‘#overlay’).fadeIn(300); }); $(‘#overlay’).click(function(e){ $(‘#overlay’).fadeOut(300, function(){ $(‘.expose’).css(‘z-index’,’1′); }); }); According to the following HTML & CSS… just add the expose … Read more

Non-ajax GET/POST using jQuery (plugin?)

jQuery Plugin seemed to work great until I tried it on IE8. I had to make this slight modification to get it to work on IE: (function($) { $.extend({ getGo: function(url, params) { document.location = url + ‘?’ + $.param(params); }, postGo: function(url, params) { var $form = $(“<form>”) .attr(“method”, “post”) .attr(“action”, url); $.each(params, function(name, … Read more

jQuery watch for domElement changes?

The most effective way I’ve found is to bind to the DOMSubtreeModified event. It works well with both jQuery’s $.html() and via standard JavaScript’s innerHTML property. $(‘#content’).bind(‘DOMSubtreeModified’, function(e) { if (e.target.innerHTML.length > 0) { // Content change handler } }); http://jsfiddle.net/hnCxK/ When called from jQuery’s $.html(), I found the event fires twice: once to clear … Read more

jQuery UI Datepicker : how to add clickable events on particular dates?

This is definitely possible, and in my opinion not too much of an abuse of the datepicker widget. There is an option to initialize the widget in-line, which can be used for exactly the scenario you describe above. There are a couple of steps you’ll have to take: Initialize the datepicker in-line. Attach the datepicker … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)