Return to Snippet

Revision: 57044
at May 8, 2012 22:20 by vjandrei

Initial Code
<p>Current page URL: <span id="this_url"></span>.</p>
<p>Current page title: <span id="this_title">mytitle</span>.</p>
<script type="text/javascript">
jQuery(document).ready(function () {
	var href = jQuery(location).attr('href');
	var url = jQuery(this).attr('title');
	jQuery('#this_title').html('<strong>' + href + '</strong>');
	jQuery('#this_url').html('<strong>' + url + '</strong>');

Initial URL

Initial Description

Initial Title
Get current page URL and title with jQuery

Initial Tags

Initial Language