Forums

Use permalink value in jquery (2 posts)

  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', '<strong>browser_title</strong>', '<strong>browser_permalink</strong>');
    
                }
            }
            catch (e) { /* browser doesn't support */ }
    
        });
    
    });

    Is it possible to do that?

    Thanks!

  2. Alejandro Urrutia
    Member
    Posted 10 months ago #

    Sorry, I just realized I posted on "PLugins and Hacks" forum, please delete this thread, I will post it again.

Reply

You must log in to post.

About this Topic