Разбор Json для Java bean

Взяв код Мэтта Локкера, я сделал простой сброс, поэтому dom не покрывается элементом в hide.

Код Мэтта: http://mattlockyer.com/2013/04/08/close-a-twitter-bootstrap-popover-when-clicking-outside/

Fiddle: http://jsfiddle.net/mrsmith/Wd2qS/

    $('body').on('click', function (e) {
    //hide popover from dom to prevent covering elements
    $('.popover').css('display', 'none');
    //bring popover back if trigger element is clicked
    $('[data-toggle="popover"]').each(function () {
        if ($(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
            $('.popover').css('display', 'block');
        }
    });
    //hide popover with .popover method
    $('[data-toggle="popover"]').each(function () {
        //the 'is' for buttons that trigger popups
        //the 'has' for icons within a button that triggers a popup
        if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
            $(this).popover('hide');
        }
    });
});

1
задан sth 12 December 2011 в 03:57
поделиться

1 ответ

ObjectMapper mapper = new ObjectMapper();
MetadataContentBean meta= mapper.readValue(metadatacontent.toString(), MetadataContentBean.class);

В этой мета-мете вся информация

2
ответ дан 2 September 2019 в 21:54
поделиться
Другие вопросы по тегам:

Похожие вопросы: