Use window.location to get the current location url.
Depending on the condition, you can apply the margin top property.
$(document).ready(function(){ var pathname = window.location.pathname; if(pathname.indexOf('text') > -1){ $('.block-widget').css('margin-top, 252px'); } });
source share