jqueryrotate icon indicating copy to clipboard operation
jqueryrotate copied to clipboard

"rotate" function doesn't allow string for angle parameter

Open GoogleCodeExporter opened this issue 9 years ago • 1 comments

When I try to call "rotate" function like:

    My script (abstract)
    $("p.angle_rotation").click(function()
    {
        $("#img").rotate({
            angle: $(this).attr('data-degree'),
        });
    });
    My HTML (abstract)
    <p class="angle_rotation" data-degree="0">0°</p>
    <p class="angle_rotation" data-degree="90">90°</p>
    <p class="angle_rotation" data-degree="180">180°</p>
    <p class="angle_rotation" data-degree="270">270°</p>
    <img id="img" src="valve.png" />

Nothing happens...

It seems that "rotate" function doesn't allow string for angle parameter.
Currently, I add "parseInt" to resolve it.

Original issue reported on code.google.com by [email protected] on 20 Jan 2014 at 2:08

GoogleCodeExporter avatar Mar 17 '15 10:03 GoogleCodeExporter

Changing priority as this is pretty minor issue, easy to solve on usage level, 
that might introduce unwanted behaviour.

Original comment by [email protected] on 20 Jan 2014 at 2:14

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

GoogleCodeExporter avatar Mar 17 '15 10:03 GoogleCodeExporter