Thursday, 6 March 2014

Background resize fix : IE8

Hi Fiendz,


Its been a headache when we think about to fix css in Internet explorer. Now i sort out a solution for resize background image issue in ie8.


I was googled for this more time, mmmmm, finally i came out with the solution of followin by one of forum friend,


To do this , Add the following style in your style property,


###########


filter: progid:DXImageTransform.Microsoft.AlphaImageLoader


(src='http://localhost/myproject/images/test.jpg',sizingMethod='scale');


###########


Note : It should be passed the full url for your images.


Try.

Wednesday, 5 March 2014

Jquery Snippet to hide some div by clicking outside

If we want apply something to hide by clicking outside the div or another div, use the following jquery code to do that.

which will be quite usefull often.

$(document).click(function(){
$("#div1").hide();
});

$("#div2,#div3").click(function(e){
e.stopPropagation();
});

in this example i use first div to hide, then i use div areas to leave the click.

Saturday, 1 March 2014

MYSQL Trick – ORDER STRING AS NUMBER

Sometimes you have to store numbers in text format. This is not a good practice, but sometimes there is no other option.

When you perform an “order by” this field,you can get something like this:

1 1
2 10
3 11
4 111
5 12
6 2
7 20
8 3

try the below query

select field from table order by field+0 asc