Using Javascript with a custom plugin
-
I’m working on a custom plugin that basically takes an existing set of files and adapts them to work as a WordPress plugin. It’s based on a “Coda Slider” mod of jQuery (demo here and files here), but I can’t seem to get it work in WordPress.
I’ve eliminated variables – rather than using my modified version of the Featured Content Slider, I used the files linked above. The plugin is activated, but it’s not even connected to anything in the admin area or databases – I merely stuck the javascript, css, and image files in the plugin folder, pasted the HTML code into a slider.php file in the plugin, used wp_enqueue_script and _style to call the necessary files, and used
<?php include (ABSPATH . '/wp-content/plugins/coda-slider/slider.php'); ?>
in my static home page to call the slider itself.Now, I read through codex, specifically this page. How exactly does the
<script type="text/javascript"><!--//--><![CDATA[//><!-- emailpage(); //--><!]]></script>
stuff work? The files from the site linked above work fine as a standalone version, so I assumed this wasn’t needed… but I tried it with and without it anyway (exchanging emailpage() with the other names of course), and it still didn’t work. Like I said though, I don’t quite understand how that works, so I might be doing it wrong.Is there anything else I’m missing as to why the Javascript won’t work? Basically, the slides don’t slide, the contents of the slide are all trying to display, statically, at once either layered on top of each other, or just below each other vertically. I’ve been at this for a couple days now, any help would be appreciated…
- The topic ‘Using Javascript with a custom plugin’ is closed to new replies.