fidel
fidel

Reputation: 89

curving text inside a div

 $().ready(function() {
$('#demo1').circleType({fitText:true, radius: 180});   });
  $().ready(function() {
            $('#example').arctext({radius: 250});
        });
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" src="http://tympanus.net/Development/Arctext/js/jquery.arctext.js"></script>
<div id="example">Here is curved text dmsdodsfnfsadknsdf></div>
<br>

<div id="demo1"> Here’s some curved text flowing clockwise.</div>

hello i was wondering if its possible to curve text inside a div using a button something like this enter image description here

enter image description here

enter image description here

Upvotes: 0

Views: 341

Answers (1)

phteven
phteven

Reputation: 1383

Your code shows that you're trying to use 2 different libraries: ArcText (http://tympanus.net/Development/Arctext/) and CircleType (http://circletype.labwire.ca/). You'll need to reference jQuery, ArcText, and Circletype libraries.

You should download both ArcText and Circletype to reference locally like this:

<script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
<script src="/js/circletype.js"></script>
<script src="/js/jquery.arctext.js"></script>

Then your JavaScript will run fine:

$(function(){
  $('#demo1').circleType( {fitText:true, radius: 180} );
  $('#example').arctext( {radius: 250} );
});

JSFiddle Demo: https://jsfiddle.net/stevenng/nyawqaab/

Upvotes: 3

Related Questions