javascripthtmliframeiscroll4

Using iScroll in iframe


All

I want to use iScroll in iframe.

This is my code

HTML

<form>
        <input type="text" class="frmUrlVal">
        <input type="submit" class="frmSubmit" value="Go">
      </form>
      <iframe src="http://www.css-tricks.com" width="360" height="500" id="dynFrame"></iframe>

JS

$(function()
{
  $('.frmSubmit').click(function(e)
  {
    $('#dynFrame').attr('src', $('.frmUrlVal').attr('value'));
    e.preventDefault();
  });
});

This is my jsfiddle link : http://jsfiddle.net/ajaypatel_aj/JtCJa/ ​ ​You can see here there is vertical scrollbar, i want to use iSroll instead of that regular scroller. I tried with applying the id but it not work for me.

Thanks In Advance !


Solution

  • I think the closest option you would have is http://jsfiddle.net/JtCJa/9/ it will still need tweaking and you cannot click the links but it works as you would expect :)