Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About gershonb

  • Rank
  1. Dear justSomeGuy Thanks for fiddling with my fiddle. I've tried yours and tried mine again (button #two was superfluous, btw). The thing is, the only font face that appears is a serifed font. No sans-serif font will load from this code. I've tried loading things like Comic Sans (important for dyslexics) and no go. Might it be necessary to prefetch the fonts in the <head> section with some code? Not sure exactly how to do that. There are other specialty fonts that I'm sure I'll have to load on the page. But here, either with toggleClass or .css() methods, the basic font family that loads at the beginning of the document doesn't change. Might it be that the default web font (serif) gets set up like a global variable? Also: is there a good reference for how javascript/jquery pages load? Thanks. (still puzzled) Gershon
  2. Hello. I am building a page for people with disabilities that involves demonstrating several fonts. There will be a pane with buttons that either a) call different classes that will load the environment, or call the jquery .css() function to load the environment that way. I have gotten both methods to work--for everything except the font-family. I've put the font-stacks into the classes, loaded the classes, and everything but font-family works. I've also loaded everything into a .css() statement--and everything but font-family works. Here's the jQuery I'm using now: <code> $(document).ready(function(){$("#numone").click(function(){ $("#texdiv").toggleClass("graybkd"); $("#texdiv").html("Here the text is blue on a Gray Background. Does this feel better? This font should be Arial, which is easier for vision-impaired people to read..."); }); }); </code> When I do everything with the .css(), the toggleClass statement is commented out and after the event handler the code looks like this: <code>$("#texdiv").css({"font-family" : "Verdana", "background-color" : "#dddddd", "border-color" : "#0000dd"}); --- etc. </code> If you want to see how this all works, you can check the following jsfiddle.net page:http://jsfiddle.net/gershonb/eJapD/118/ As you will see, everything works--except the font-family change. It kind of stumps me when everything works except for one small part. Thanks Gershon
  • Create New...