xkzfzdetail.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. *demo
  3. *
  4. */
  5. $.namespace("xkzfz.detail");
  6. xkzfz.detail.path=null;
  7. xkzfz.detail.back=function(){
  8. if(xkzfz.detail.path!=null&&xkzfz.detail.path!=''){
  9. location.href=$.app+xkzfz.detail.path;
  10. }else{
  11. location.href=$.app+"/xkzfz/main";
  12. }
  13. };
  14. /* 当前页面高度 */
  15. function pageHeight() {
  16. return document.body.scrollHeight;
  17. }
  18. /* 当前页面宽度 */
  19. function pageWidth() {
  20. return document.body.scrollWidth;
  21. }
  22. xkzfz.detail.show=function(objs){
  23. $("#overlay").fadeTo(500, 0.5);
  24. $("#dv"+objs).show(500);
  25. $("#dv"+objs).css("left",pageWidth()*0.1);
  26. $("#dv"+objs).css("top",pageHeight()*0.1);
  27. }
  28. xkzfz.detail.hide=function(objs){
  29. $("#dv"+objs).hide(500);
  30. $("#overlay").fadeOut(500);
  31. }
  32. xkzfz.detail.showTwoCode=function(){
  33. $("#overlay").fadeTo(500, 0.5);
  34. $("#dvTwoCode").show(500);
  35. $("#dvTwoCode").css("left",pageWidth()*0.1);
  36. $("#dvTwoCode").css("top",pageHeight()*0.1);
  37. }
  38. xkzfz.detail.hideTwoCode=function(){
  39. $("#dvTwoCode").hide(500);
  40. $("#overlay").fadeOut(500);
  41. }