Category Archives: JavaScript

JavaScript URL Redirection

If you want to set page redirection, Add the below JavaScript code in header of that page with redirection code with the URL of the page you want to redirect to.
Just FYI, Javascript redirect does not return 301 permanent redirect status code.

<script type="text/javascript">
    // JavaScript URL redirection

Redirect page after submitting contact form 7

If you want to redirect the page after the web form submission. Then you can do it easily by adding the JavaScript code in header.php Or footer.php.

<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
    location = '/thank-you/';
}, false );

Also if you want a different page for a specific contact form (ID=123) after submission, then you can add the following code.

<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
    if ( '590' == event.detail.contactFormId ) {
        location = '/quote-thank-you/';
}, false );

Tooltip on mouse over

Hey, Check this cool tooltip with lots of features. It’s fully customizable & easy to use.

.tooltip {
 border:1px solid #333;

<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(document).ready(function() {
// Tooltip only Text
        // Hover over code
        var title = $(this).attr('title');
        $(this).data('tipText', title).removeAttr('title');

') .text(title) .appendTo('body') .fadeIn('slow'); }, function() { // Hover out code $(this).attr('title', $(this).data('tipText')); $('.tooltip').remove(); }).mousemove(function(e) { var mousex = e.pageX + 20; //Get X coordinates var mousey = e.pageY + 10; //Get Y coordinates $('.tooltip') .css({ top: mousey, left: mousex }) }); }); </script>


Tooltip on the link

Tooltip on the title