jQuery/width()

解説
指定要素の横幅値

width(val)

sample1
sample1code
$(function(){
  $(".samplebox").on('click', function () {
    $(this).width(30).css("background", "#7146ba");
  });
});
sample2
sample2code
$(function(){
  $("#sample2Btn").click(function(){
	alert($(window).width());
  });
});
sample3
sample3Div
sample3code
$(function(){
  $("#sample3Div").click(function(){
  	var w = $(window).width();
  	$(this).width(w);
  });
});
sample4
s4Div
sample4code
$(function(){
  $("#s4Div").click(function(){
  	$(this).width("+=10");
  });
});