yi-huan / jqueryrotate

Automatically exported from code.google.com/p/jqueryrotate
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 remi.vai...@baobaz.com on 20 Jan 2014 at 2:08

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

Original comment by wil...@gmail.com on 20 Jan 2014 at 2:14