Hi, I need to know is it possible to handle function on this events 'collapse' and 'expand', as I see in Events – jQuery API there is nothing about these events, how do I can call function to them? There is only resize, but it's not the same!
p.s. it's need for make my font-size resizable, maybe we have another solution?
How do I make my font size resizable using JQuerry or JavaScript?
Started by Stasonix, Oct 30 2011 02:40 AM
1 reply to this topic
#1
Posted 30 October 2011 - 02:40 AM
|
|
|
#2
Posted 30 October 2011 - 08:10 PM
How the existing .resize() differs to yours, precisely?
Something like below was developed from .resize():
Something like below was developed from .resize():
$(document).ready(function() {
var
oldWinH = $(window).height(),
oldFontSize = $('#targetElementID').css('font-size').slice(0,-2);
$(window).resize(function() {
var
newWinH = $(window).height(),
newFontSize = Math.round(newWinH / oldWinH * oldFontSize);
$('#targetElementID').css('font-size', newFontSize);
});
});
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









