0

I am trying to customize TurnJS with some special effects. I need to show current page number while flip each page into a <input type="text" id="pageNumber" value=""> field.

The value should get with this function (added alert for test):

$("#flipbook").bind("turned", function(event, page, view) {
  alert("Page: "+$("#flipbook").turn("view")[0] +$("#flipbook").turn("view")[1] );
});

How can I get this value to the <input> field?

Can I use this: Get the value in an input text box ?

Rob
  • 14,746
  • 28
  • 47
  • 65
vishnu
  • 2,848
  • 3
  • 30
  • 55

1 Answers1

0

You can use the jQuery .val() method to fill the input-tag.

$("#flipbook").bind("turned", function(event, page, view) {
  $('#pageNumber').val(page);
});

See jQuery .val()

Ruben Pauwels
  • 350
  • 3
  • 13