Wednesday, 20 May 2015

How to Highlight the active navbar link with jQuery in Twitter Bootstrap .


    jQuery(document).ready(function () {
        var url = window.location;
        jQuery('ul.nav a[href="'+ url +'"]').parent().addClass('active');
        jQuery('ul.nav a').filter(function() {
             return this.href == url;


Thursday, 14 May 2015

How to get Filezilla Quickconnect History


- Edit the file called "recentservers.xml" and edit/remove the <Server> elements you want

How to add class based on active URL in PHP and in jQuery

//Past into Header
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$page_class =explode('/',$actual_link);

<body class="<?=end($page_class);?>">

================= jQuery ==============

$(function() {
  var loc = window.location.pathname; // returns the full URL
var split_loc = loc.split('/');
active_loc = split_loc[split_loc.length-1];
$('body').addClass(active_loc + "-page");


Alternative content