jquery problem with opera and ie and working woth firfox
i\'m trying to make some thing like voting system
i have this jquery code $(function() { $(\'#vote a span\').click(function(){ alert(\'working\'); return false; }) ;});and this html code <div id=\"vote\"> <a href=\'#\'><span>one</span></a> </div> <div id=\"vote\"> <a href=\'#\'><span>two</span></a> </div> in firfox when click one its show me an alert this mean its works fine in ie and opeara its not working can any one tell me why
1 Answer
id should be unique. Use classes instead!
<div class="vote"> <a href='#'><span>one</span></a> </div> <div class="vote"> <a href='#'><span>two</span></a> </div> and it will work fine Posted: MacOS 2 of 2 people found this answer helpful. Did you? Yes No oh my god!! its worked fine thank you |
© Advanced Web Core. All rights reserved