Tag Archives: jquery

WordPress disable parent menu using jquery

<script language=javascript> jQuery(“#menu-firstmenu li:has(ul.sub-menu)”).hover(function () { jQuery(this).children(“a”).click(function () { return false; }); }); </script>  Advertisements

Posted in jquery, WordPress | Tagged , , | 7 Comments

Include ajax in wordpress using jquery?

To include ajax in wordpress plugin:- for eg. if we want to use ajax on click of some event <div id=”ajaxid” onclick=”testfn(1)” /> <script type=”text/javascript”> function testfn(val) { jQuery.ajax({ type: “post”,url: “admin-ajax.php”,data: { action: ‘save_data’, val: val}, success: function(html){ //so, … Continue reading

Posted in jquery, WordPress | Tagged , , | 1 Comment