Sliding form stop animation if mandatory field empty

I have a big form so for that am using sliding form

but i need to stop sliding step1 to step2 if mandatory field is empty in step1

for that i had changed function like this

    function validateStep(step) {
            if (step == fieldsetCount) return;

            var error = 1;
            var hasError = false;
            $('#formElem').children(':nth-child(' + parseInt(step) + ')').find(':input:not(button)').each(function () {
                var $this = $(this);
                var valueLength = jQuery.trim($this.val()).length;

                if (valueLength == '') {
                    hasError = true;
                    $this.css('border-color', '#f8bcc2')
// here i added one function 
                    $('#steps').each(function () {
                        //   alert('hhh');
                        marginLeft: '0' + 'px'


                    //                $('#steps').css('margin-Left', '0')
                    $this.css('border-color', '#8DC440');

Thanks in advance... if any solutions


When you click check:

  var _this=$(this), i = $(this).index(), valid;
  var set=$("#steps formset").get(index-1);
  valid=// Here check set all mandatory field is not empty
  if(valid) $("#steps formset").get(index)/*slide*/

Add 'mandatory' class to recognize mandatory field.

Need Your Help

CSS Menu - All menu items show when hover 1 Menu Item

html css menu

I have a CSS/HTML based menu and when i hover on a single menu item All child menu items shown. what can be the

JQGrid - SetRowData - Returns success but no data updated

javascript jqgrid

I am trying to add/edit data into my JQGrid. Currently the first column is populated and then the other six are blank and are dependent upon the first column. So I need to add or "edit the blank" ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.