job_apply.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* ------------------------------------------------------------------------------
  2. *
  3. * # Job search - apply
  4. *
  5. * Demo JS code for job search page kit - apply
  6. *
  7. * ---------------------------------------------------------------------------- */
  8. // Setup module
  9. // ------------------------------
  10. var JobApply = function () {
  11. //
  12. // Setup module components
  13. //
  14. // Uniform
  15. var _componentUniform = function() {
  16. if (!$().uniform) {
  17. console.warn('Warning - uniform.min.js is not loaded.');
  18. return;
  19. }
  20. // Initialize
  21. $('.form-input-styled').uniform({
  22. fileButtonClass: 'action btn bg-pink-400'
  23. });
  24. };
  25. // Select2
  26. var _componentSelect2 = function() {
  27. if (!$().select2) {
  28. console.warn('Warning - select2.min.js is not loaded.');
  29. return;
  30. }
  31. // Initialize
  32. $('.form-control-select2').select2();
  33. };
  34. // Datepicker
  35. var _componentUiDatepicker = function() {
  36. if (!$().datepicker) {
  37. console.warn('Warning - jQuery UI components are not loaded.');
  38. return;
  39. }
  40. // Initialize
  41. $('.datepicker').datepicker();
  42. };
  43. //
  44. // Return objects assigned to module
  45. //
  46. return {
  47. init: function() {
  48. _componentUniform();
  49. _componentSelect2();
  50. _componentUiDatepicker();
  51. }
  52. }
  53. }();
  54. // Initialize module
  55. // ------------------------------
  56. document.addEventListener('DOMContentLoaded', function() {
  57. JobApply.init();
  58. });