Jump to content

Jquery Fill-Text Plug-in Multiple spans


syngod

Recommended Posts

Hey guys,

 

  Im kind of a newbie when it comes to javascript and i am trying to use a fill-text jquery plugin Found here https://github.com/jquery-textfill/jquery-textfill

 

what i need to do is have multiple spans on the page expand to a certain size but im not sure how to do this with this plugin or if it is even possible.

 

here is the page i have.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://jquery-textfill.github.io/jquery-textfill/jquery.textfill.min.js"></script>

<title></title>
</head>

<div id="visitorNotice" >
    <div id="text" class="textfill">
	    <span>Testing</span>
		<div id="visitors" class="stextfill">
		    <span>Testing</span>
		<div>
	</div>
</div>
<script>
$(function() {
  $('.textfill').textfill({ maxFontPixels:99});
});
</script>
<script>
$(funtion() {
  $('.stextfill').textfill({ maxFontPixels:80});
  });
 </script>
<body>

you can see what i tried to do, to get this to work.  But this does not work and im not sure exactly how to make it work.

 

Can anyone give me ideas on how to make this work.

Link to comment
https://forums.phpfreaks.com/topic/281135-jquery-fill-text-plug-in-multiple-spans/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.