Friday, March 27, 2015

Html form tabindex enter press control by Jquery

Html form tabindex control by Jquery, follow below code: 
*note: this below code actually a hint, programmers can understand how to use it:

<form id="form1" name="form1" action="saver.php" method="post">
        <label>Name:</label>
        <input name="name" value="" tabindex="1">
        <label>Roll:</label>
        <input name="roll" value="" tabindex="2">
        <label>Address:</label>
        <input name="address" value="" tabindex="3">
        <label>Phone:</label>
        <input name="phone" value="" tabindex="4">
        <label>Email:</label>
        <input name="email" value="" tabindex="5">
        <input type="submit" tabindex="6">

    </form>
----------------------------------------------------------------------------------------------
<script>
    $(document).ready(function () {
        $("#form1 input:first").focus();
        $('#form1').on('keydown', 'input', function (event) {
            if (event.which == 13) {            
                var $this = $(event.target);
                var index = parseFloat($this.attr('tabindex'));
                $('[tabindex="' + (index + 1).toString() + '"]').focus();
                if (index == 6) {
                    return true;
                }
                return false;
            }
        });
    });
</script>

Wednesday, March 18, 2015

raw query plan to get woocommerce order by specific user


First go to postmeta table with user id then you will get order id as post id then with those post id go to order_itemmeta table to get order details in row then with that order_itemmeta table you will get order_item_id with meta value, this meta value is your product id you can now get that product info by that product id in posts table now make a join query to get all those thing in one table :) Good luck!

Wednesday, January 28, 2015

Redirecting page by js

<a href="http://ashique12009.files.wordpress.com/2011/06/js.jpg"><img src="http://ashique12009.files.wordpress.com/2011/06/js.jpg" alt="" title="js" width="157" height="127" class="alignnone size-full wp-image-24" /></a>
<strong>this works fine for every browser</strong>
<strong>window.location.href='url';</strong>

PHP 1 page solution...

you can use hidden variable to post something on same page without not going to another page...i'll show you later...

One tricky infinity time animation by jquery

$(document).ready(function(){
$.fn.grow_anim=function(){
$("#anim").animate({paddingLeft: "100px"}, 1000);
$(this).shrink_anim();
}

$.fn.shrink_anim=function(){
$("#anim").animate({paddingLeft: "15px"}, 1000);
$(this).grow_anim();
}

$("#anim").bind("mouseenter",function(){
$("#anim").stop(true);
});

$("#anim").bind("mouseleave",function(){
$(this).grow_anim();
});
});

I am explaining below:

Normally animation running and running but when you put your mouse on that Div or text in that time animation will be stop then again when you leave your mouse pointer from that div or text your animation will be running normally.

try it good luck.

Maximum Css Hack Tools

<strong>IE7</strong>= *attribute:value;
<strong>IE8</strong>= attribute/*\**/:value\9;
<strong>IE9</strong>= watch out below -&gt;

<a href="http://ashique12009.files.wordpress.com/2011/06/ie9.png"><img class="alignnone size-full wp-image-36" title="ie9" src="http://ashique12009.files.wordpress.com/2011/06/ie9.png" alt="" width="203" height="25" /></a>

/************************************************/
<strong>opera</strong>
@media all and (-webkit-min-device-pixel-ratio:10000), not all and
(-webkit-min-device-pixel-ratio:0) {
css goes here
}
/************************************************/
/************************************************/
<strong>safari and google crome</strong>
@media screen and (-webkit-min-device-pixel-ratio:0){
css goes here
}
/************************************************/

Add copy paste and delete button in windows 7 menu bar

<font color="red"><b>Step 1:</b></font>
go to run and type regedit.
<font color="red"><b>Step 2:</b></font>
go to
HKEY_LOCAL_MACHINE -&gt;
Software -&gt;
Microsoft -&gt;
Windows -&gt;
CurrentVersion -&gt;
Explorer -&gt;
FolderTypes -&gt;
{5c4f28b5-f869-4e84-8e60-f11db97c5cc7} .
<font color="red"><b>Step 3:</b></font>
create a key here and give name of this key is : TasksItemsSelected
<font color="red"><b>Step 4:</b></font>
inside this key you need to give a value :
Windows.Copy; Windows.Paste; Windows.Delete;
<font color="red"><b>Step 5:</b></font>
Restart or Refresh your PC then your are done.

Wordpress debug log function

Wordpress error log code: if ( ! function_exists ( 'write_log' ) ) { function write_log ( $data ) { if ( defined ( '...