Difference between revisions of "User:Andr3w/vector.js"

From SQLZOO
Jump to: navigation, search
Line 2: Line 2:
 
   if (window.location.search.contains('answer')){
 
   if (window.location.search.contains('answer')){
 
     $('.quf textarea').each(function(){
 
     $('.quf textarea').each(function(){
       var ans = $(this).closest('form').next('.ans').text()
+
       $(this).val($(this).closest('form').next('.ans').text());
      console.log(ans);
+
 
     })
 
     })
 
   }
 
   }
 
})
 
})

Revision as of 20:11, 28 February 2013

$(function(){
  if (window.location.search.contains('answer')){
    $('.quf textarea').each(function(){
       $(this).val($(this).closest('form').next('.ans').text());
    })
  }
})
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense