var isie8 = false;
if ($.browser.msie && parseInt($.browser.version, 10) === 8) {
isie8 = true;
}
function SetDropDownCertificateNew() {
// The select element to be replaced:
var select = $('select.sel_Certificate');
var selectBoxContainer = $('
').attr('width', select.outerWidth()).attr('class', 'ShareBoxNew').html('
');
var dropDown = $('
').attr('class', 'dropDown');
var selectBox = selectBoxContainer.find('.selectBoxNew');
// Looping though the options of the original select element
select.find('option').each(function (i) {
var option = $(this);
if (i == select.attr('selectedIndex')) {
selectBox.html('' + option.text() + '');
}
// As of jQuery 1.4.3 we can access HTML5
// data attributes with the data() method.
if (option.attr('data-skip')) {
return true;
}
// Creating a dropdown item according to the
// data-icon and data-html-text HTML5 attributes:
var li = $('- ').html('' + option.text() + '');
li.click(function () {
selectBox.html('' + option.text() + '');
dropDown.trigger('hide');
// When a click occurs, we are also reflecting
// the change on the original select element:
select.val(0);
var liValue = option.val();
certificate = liValue;
currentPage = 1;
CallAjaxRequest();
return false;
});
dropDown.append(li);
});
selectBoxContainer.append(dropDown.hide());
select.hide().after(selectBoxContainer);
// Binding custom show and hide events on the dropDown:
dropDown.bind('show', function () {
$('.dropDown').attr('style', 'display:none');
$('.selectBox3').removeClass('expanded');
if (dropDown.is(':animated')) {
//return false;
}
selectBox.addClass('expanded');
if (isie8)
dropDown.show();
else
dropDown.slideDown();
}).bind('hide', function () {
if (dropDown.is(':animated')) {
//return false;
}
selectBox.removeClass('expanded');
if (isie8)
dropDown.hide();
else
dropDown.slideUp();
}).bind('toggle', function () {
if (selectBox.hasClass('expanded')) {
dropDown.trigger('hide');
}
else {
dropDown.trigger('show');
}
});
selectBox.click(function () {
dropDown.trigger('toggle');
return false;
});
// If we click anywhere on the page, while the
// dropdown is shown, it is going to be hidden:
$(document).click(function () {
dropDown.trigger('hide');
});
}
function SetDropDownCertificate() {
// The select element to be replaced:
var select = $('select.sel_Certificate');
var selectBoxContainer = $('
').attr('width', select.outerWidth()).attr('class', 'ShareBox').html('
');
var dropDown = $('
').attr('class', 'dropDown');
var selectBox = selectBoxContainer.find('.selectBox3');
// Looping though the options of the original select element
select.find('option').each(function (i) {
var option = $(this);
if (i == select.attr('selectedIndex')) {
selectBox.html('' + option.text() + '');
}
// As of jQuery 1.4.3 we can access HTML5
// data attributes with the data() method.
if (option.attr('data-skip')) {
return true;
}
// Creating a dropdown item according to the
// data-icon and data-html-text HTML5 attributes:
var li = $('- ').html('' + option.text() + '');
li.click(function () {
selectBox.html('' + option.text() + '');
dropDown.trigger('hide');
// When a click occurs, we are also reflecting
// the change on the original select element:
select.val(0);
var liValue = option.val();
certificate = liValue;
currentPage = 1;
CallAjaxRequest();
return false;
});
dropDown.append(li);
});
selectBoxContainer.append(dropDown.hide());
select.hide().after(selectBoxContainer);
// Binding custom show and hide events on the dropDown:
dropDown.bind('show', function () {
$('.dropDown').attr('style', 'display:none');
$('.selectBox3').removeClass('expanded');
if (dropDown.is(':animated')) {
//return false;
}
selectBox.addClass('expanded');
if (isie8)
dropDown.show();
else
dropDown.slideDown();
}).bind('hide', function () {
if (dropDown.is(':animated')) {
//return false;
}
selectBox.removeClass('expanded');
if (isie8)
dropDown.hide();
else
dropDown.slideUp();
}).bind('toggle', function () {
if (selectBox.hasClass('expanded')) {
dropDown.trigger('hide');
}
else {
dropDown.trigger('show');
}
});
selectBox.click(function () {
dropDown.trigger('toggle');
return false;
});
// If we click anywhere on the page, while the
// dropdown is shown, it is going to be hidden:
$(document).click(function () {
dropDown.trigger('hide');
});
}
function SetDropDownOrigin() {
// The select element to be replaced:
var select = $('select.sel_Origin');
var selectBoxContainer = $('
').attr('width', select.outerWidth()).attr('class', 'ShareBoxNew1 ').html('
');
var dropDown = $('
').attr('class', 'dropDown');
var selectBox = selectBoxContainer.find('.selectBoxNew');
// Looping though the options of the original select element
select.find('option').each(function (i) {
var option = $(this);
if (i == select.attr('selectedIndex')) {
selectBox.html('' + option.text() + '');
}
// As of jQuery 1.4.3 we can access HTML5
// data attributes with the data() method.
if (option.attr('data-skip')) {
return true;
}
// Creating a dropdown item according to the
// data-icon and data-html-text HTML5 attributes:
var li = $('- ').html('' + option.text() + '');
li.click(function () {
selectBox.html('' + option.text() + '');
dropDown.trigger('hide');
// When a click occurs, we are also reflecting
// the change on the original select element:
select.val(0);
var liValue = option.val();
SOrigin = liValue;
currentPage = 1;
CallAjaxRequest();
return false;
});
dropDown.append(li);
});
selectBoxContainer.append(dropDown.hide());
select.hide().after(selectBoxContainer);
// Binding custom show and hide events on the dropDown:
dropDown.bind('show', function () {
$('.dropDown').attr('style', 'display:none');
$('.selectBox3').removeClass('expanded');
if (dropDown.is(':animated')) {
//return false;
}
selectBox.addClass('expanded');
if (isie8)
dropDown.show();
else
dropDown.slideDown();
}).bind('hide', function () {
if (dropDown.is(':animated')) {
//return false;
}
selectBox.removeClass('expanded');
if (isie8)
dropDown.hide();
else
dropDown.slideUp();
}).bind('toggle', function () {
if (selectBox.hasClass('expanded')) {
dropDown.trigger('hide');
}
else {
dropDown.trigger('show');
}
});
selectBox.click(function () {
dropDown.trigger('toggle');
return false;
});
// If we click anywhere on the page, while the
// dropdown is shown, it is going to be hidden:
$(document).click(function () {
dropDown.trigger('hide');
});
}