Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. $(".questions").children().hide();
  2. $(" div.questions > div:nth-child("+history[get_number]+")").fadeIn();
  3.  
  4. $(function(){
  5. $(document).on('click', '.questions > div', function(){
  6. if( $(this).is(':last-child') ){
  7. alert('Last Question');
  8. } else {
  9. alert('Regular Question');
  10. }
  11. });
  12. });
  13.  
  14. $("div.questions > div:last").unbind('click');
  15.  
  16. $(document).on('click', '.questions > div:not(:last-child)', function(){
  17. alert('Regular Question');
  18. });
  19.  
  20. $(document).on('click', '.questions > div:last-child', function(){
  21. alert('Specific Question');
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement