Closed (fixed)
Project:
Text Resize
Version:
5.x-1.0
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2008 at 00:48 UTC
Updated:
23 Dec 2008 at 18:17 UTC
Is there documentation anywhere with instructions? Specifically, I've got the demo block in a sidebar, but clicking the icons doesn't seem to do anything .When I config. the bock, there's a field for "target tag" ... what do I put there to make the buttons apply to the all the node text?
Also, where the block displays... can't figure out how to get rid of the text "The buttons within the block change the size of the blue area in the main content, while this text can be changed with the buttons on the block header above."
Comments
Comment #1
aharown07 commented.
Comment #2
twooten commentedI'm also trying to make this work. Anybody know how??
Comment #3
bomarmonk commentedMe too: any documentation would be appreciated, even if it's a rough draft... thanks again for the module!
Comment #4
twooten commentedI think I've got it figured out. I first tried to add my class to the "target tag" field in the JQuery Fontsizer Demo Block but I could never seem to get that to change any font sizes. Besides, even if it did change the font size you still have the problem of all that demo text in the block. The only way to get rid of that is to hack into the module and delete it.
Here is what you do to get a working fontsizer.
- enable the JQuery Fontsizer Demo Block and put it anywhere on your page
- then view the page source code to see what the module is generating, what you're looking for here is the stuff between and including the span tags.
This is what the code looks like when using the demo block and viewing the html source;
- copy that code or I suppose you can just use what's in this post, that's what I would do because I'm lazy like that.
- create a new block and call it whatever, I called mine fontsizer.
- configure the new block and paste the code you copied into the block body textarea.
- figure out the css selectors for the fonts you want to increase/decrease. I use firefox's webdeveloper plugin to determine the selector, mine happens to be #content.
- change "#fnt-demo" to the tag you are targeting. For me, I want to effect the paragraph fonts in the content area so I changed "#fnt-demo" to "#content p".
Note there are three places to change it within the span tags,
- "$.FontSizer.DecreaseSize('#fnt-demo');"
- "$.FontSizer.IncreaseSize('#fnt-demo');"
- "$.FontSizer.Reset('#fnt-demo');"
- save your block and put it wherever you want
- you can now set JQuery Fontsizer Demo Block to not show anywhere as it's no longer needed.
This worked great for one site I'm working on but I'm having a little trouble figuring out the correct selector to use on another site. Anyway, I hope this makes sense and helps you.
Tim
Comment #5
bomarmonk commentedBingo! Thanks, twooten, that did the trick!
Comment #6
mkrakowiak commentedOne more important thing. Once you create a new block with this kind of content:
<span id="fontsizer"><a onclick="$.FontSizer.DecreaseSize('.content');"><img src="/sites/all/modules/jquery_fontsizer/images/fontsizer-dec.png" alt="Decrease font size"></a><a onclick="$.FontSizer.IncreaseSize('.content');"><img src="/sites/all/modules/jquery_fontsizer/images/fontsizer-inc.png" alt="Increase font size"></a><a onclick="$.FontSizer.Reset('.content');"><img src="/sites/all/modules/jquery_fontsizer/images/fontsizer-res.png" alt="Reset font size"></a></span>you also have to change the obj parameter in the module settings (http://example.com/admin/settings/jquery_fontsizer):
Comment #7
twooten commentedInteresting... I didn't change anything in mine and it still seems to be working ok.
Comment #8
mkrakowiak commentedYeah, if I leave it as 'body', then the font size resets to the default of my browser, which is 16px. I could change the default font size in the browsers, but it wouldn't solve the problem for those coming to the website. I just want to have more control over this.
I tested it in both Firefox 3 and IE7...
Comment #9
goodghost commentedyou can edit jquery_fontsizer.module file, search for "body" text and you'll find similar code that u have seen in fontsizer.js, change it to your css class or Id, the font size of the rest site is deifned by your css, not by style="fontsize: 1em"
Comment #10
attheshow commented