• I’m having trouble trying to add this php code to an html wordpress page, (I don’t want to use any plugins for this, I’d like it to work how it should work, through php on an html page). Here’s the php code:

    $("selector").threesixty({images:[array of images], method:'click', direction:'forward', sensibility: 1});

    of course I replace the “arry of images” with my own images… Anyways, I’ve tried adding the php echo:

    <?php echo $("selector").threesixty({images:[https://www.mathieusavard.info/threesixty/13.jpg], method:'click', direction:'forward', sensibility: 1}); ?>

    and other variations, so far nothing has worked.

    It’s a 3D jquery image rotater and when it works the code should be outputed like this:
    <img src="18.jpg" id="auto" width="480" height="480" style="position: relative; top: 0px; left: 0px; cursor: all-scroll; ">

    Instead I just get the<?php echo $("selector... output.

    For more info on the plugin, visit this link:
    https://www.mathieusavard.info/threesixty/demo.html

    Sidebar: I’ve inserted the .js link in my header as well as the latest javascript version. ??

Viewing 1 replies (of 1 total)
  • What you have posted is not PHP code but JQuery.

    Try this instead:

    <script type="text/javascript">
    $("selector").threesixty({images:[array of images], method:'click', direction:'forward', sensibility: 1});
    </script>

    not sure about the [array of images] thing. I would assume that needs to be replaced with a javascript array with image URLs.

Viewing 1 replies (of 1 total)
  • The topic ‘Trouble inserting PHP into HTML’ is closed to new replies.