$(window).resize(function(){
var width = $("#profilepicfortopbar").width()*0.1;
$("#profilepicfortopbar").css('width',width);
});
Or
$(function(){
var width = $("#profilepicfortopbar").width()*0.1;
$("#profilepicfortopbar").css('width',width);
});
Update It's work. Maybe U wrong include jquery. Try include:
$function(){
alert('work');
});
Do U see alert ?