You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
1.3 KiB

10 years ago
  1. // This file depends heavily on jquery, jquery validation, jquery ui and bootstrap.js. So be nice and include them on the page.
  2. $(function () {
  3. $('form').validate();
  4. $('input.datepickerify').datepicker($.datepicker.regional["fa"]);
  5. /* Setup tooltip */
  6. $('.form-help').each(function () {
  7. if ($(this).data('for') != undefined) {
  8. $('#' + $(this).data('for')).tooltip({ trigger: 'focus', title: $(this).attr('title'), placement: 'left' });
  9. }
  10. $(this).tooltip();
  11. });
  12. $('.assess-inputs').each(function () {
  13. $(this).bind('submit', function (e) {
  14. //var alert = '<div class="alert alert-info fade in rtl"><button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button><h4>فرم شما خیلی خلوته!</h4><p>با این شرایط ما نمیتونیم به شما کمک کنیم. اگر مایل هستید اطلاعات بیشتری پر کنید.</p><p><button type="submit" class="btn btn-danger">ارسال آگهی</button></p></div>';
  15. //$(this).children('input[type=submit], button[type=submit]').fadeOut('fast')
  16. //$(this).prepend(alert);
  17. //$(this).data('sparse-alert-showed', 'true');
  18. //e.preventDefault();
  19. });
  20. });
  21. });