Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. <div class="sub-middle-column">
  2. <div class="div-header">Grandsire
  3. <a "#", class="table-control-focus sub-header-table-focus" id="table-control-focus-t" >abc</a>
  4. <ul class="table-controls hide side-action-items">
  5. <li>
  6. <a data-remote="true" data-box-no="1" class="find_or_add_horse" href="#">Find/Add Horse</a>
  7. </li>
  8. <li>
  9. <a href="go_to_next_horse" data-remote="true">Go to the Next Horse</a>
  10. </li>
  11. </ul>
  12. </div>
  13. <input type="text" name="search" id="search" class="search_horse">
  14. </div>
  15.  
  16. $(document).on('click', '.find_or_add_horse', function(){
  17. // on clicking on find/add horse link I need the value of text field here
  18. });
  19.  
  20. console.log($(this).parents('.sub-middle-column').find('.search_horse').val());
  21.  
  22. $(document).on('click', '.find_or_add_horse', function(){
  23. var value = $('#search').val();
  24. });
  25.  
  26. $(document).on('click', '.find_or_add_horse', function(){
  27. alert($('#search').val());
  28. });
  29.  
  30. $(document).on('click', '.find_or_add_horse', function(){
  31. alert($(this).closest('.sub-middle-column').find('.search_horse').val());
  32. });
  33.  
  34. $(document).on('click', '.find_or_add_horse', function(){
  35. var textValue= $('#search').val();
  36. });
  37.  
  38. $(document).on('click', '.find_or_add_horse', function(){
  39. var inputtextvalue = $.trim($("#search").val());
  40. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement