Sidr Click Action Jquery

492 Views Asked by At

I am trying create a web page with sidr plugin & jquery. When someone click on a list item it will do something like saying which item is it. I've created a basic html file like:

http://pastebin.com/hc4QyxW6

with calling jquery and sidr library as you can see. My css file is the one provided by sidr. When I click on the ones on body, no problem. But when I click the items on the sidebar it jquery won't activates the click activity? How can I make the ones in sidebar work? I am looking for a solution for 5 hours. Please help :D

Thank you.

Here is My file

1

There are 1 best solutions below

0
On

A few tips: your doctype is very old html5 is plainer and suited for jquery. use this:

<!doctype html>
<html>
</html>

secondly all of your css for jquery comes before the script to call jquery.and the script to actually use the jquery should be in the head of your document. if you are using jquery and jquery ui jquery must be listed first or the ui wont work. after that you should be able to link everything with the id's (the #'s withnames). like this:

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<style>

after that the javescript selectors ($document.ready function) or css id's ( #id_name {whatever-style :attribute;} ) get applied to what your want the to by id'ing them in the element you want them used in ( like div id="#demoheader" or div data-role="content" id "demoheader" or whatever.) i hope this helps.