qtip을 사용하고 qtip에 표시되는 포함 된 양식을 만들려고합니다. 내 양식에 제출 이벤트를 만들려고 할 때 아무 일도 일어나지 않습니다. jquery 1.7 및 최신 qtip 버전을 사용하고 있습니다.qtip2와 함께 양식을 사용할 수 없습니다. (이벤트가 활성화되지 않습니다.)
나는 http://craigsworks.com/projects/qtip2/demos/에서 예제를 사용하려고했지만 데모는 저에게 효과가 없습니다. 제 코드를보고 제게 잘못한 게 있는지 말해주세요.
미리 감사드립니다.
$("#addNews").qtip({
position: {
corner: {
target: 'bottomMiddle',
tooltip: 'topMiddle'
},
adjust: { x: 0, y: 0 }
},
show: {
when: { event: 'click' },
solo: true
},
hide: {
fixed: true,
when: { event: 'unfocus' }
},
content: {
text: '<form id="frmAddNews"><div class="inputWrap left"><div class="label">Rubrik</div><input type="text" id="" name="" class="inputText" value="" /></div><div class="inputWrap left"><div class="labelTextarea">Meddelande</div><textarea id="" name="" class="inputTextarea" value=""></textarea></div><div class="submit_container"><input type="submit" value="Lägg till nyhet" /></div><div style="clear:both"></div></form>',
},
style: {
border: {
width: 5,
radius: 2,
color: '#e1e1e1'
},
width: 350,
background: '#FFF',
padding: 15,
tip: true, // Give it a speech bubble tip with automatic corner detection
name: 'cream' // Style it according to the preset 'cream' style
},
events: {
render: function(event, api) {
$('form', this).bind('submit', function(event) {
event.preventDefault();
console.log("hej");
});
}
},
});
정확히 무엇을 하려는지 확실하지 않습니다. 그러나 당신의'
qtip 안에 표시되는 양식을 사용하려고합니다. 나는 render-function 내부에서 console.log를 사용하려고 시도했지만 거기도 가지 않을 것이다. 콘텐츠 내부의 텍스트는 내 양식으로 구성됩니다. – hgerdin