i showed someone this link http://www.goal.com/en-us/comment/c...nd-johan-cruyff-/comments&entityId=7336621and asked him how the thumbs up / thumbs down ratings was done . he said he believe its javascript / jquery but doesn't know how . please does anyone know if it was done with JS / Jquery ? if yes how
Yes it is done via Javascript. JQuery is a javascript library meaning that it is a simplified form of javascript that makes it writing javascript a lot easier, quicker and with a bunch of great functions thrown in. I have created a thumbs up, thumbs down script on one of my sites http://mpgdata.com. It is not an easy thing to code from scratch but essentially it is made up of two click events, one bound to each element. When one is clicked the number inside it is extracted, incremented and then placed back inside. That's the easy part. You then need a variety of if statement detecting whether or not the opposing button has been pressed. If it has then you need to deduct the opposing element's number by 1 and increment the pressed number. To stored the results ajax calls must be used to communicate with a database. This is a very brief explanation but should give you an idea as to where to start. W.