Forums

Use permalink value in jquery (1 post)

  1. Alejandro Urrutia
    Member
    Posted 10 months ago #

    Hi people, I need to get the_title and the_permalink to use instead of: "browser_title" and "browser_permalink"

    jQuery(document).ready(function(){
    
        jQuery('.portfolio-item a').live('click', function(e){
            e.preventDefault();
            var link = jQuery(this).attr('href');
            jQuery('#contenthome').fadeOut(500).load(link + ' #content-wrapper', function(){ jQuery('#contenthome').fadeIn(500); });
            $('html, body').animate({scrollTop:0}, 'slow');
            try {
                if (window.location.search.substring(1).length == 0) { // if no query string
                    window.history.pushState('page', 'browser_title', 'browser_permalink');
    
                }
            }
            catch (e) { /* browser doesn't support */ }
    
        });
    
    });

    Is it possible to do that?

    Thanks!

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 10 months ago by Alejandro Urrutia
  • This topic is not resolved
  • WordPress version: 3.2.1