How to diagnose why added element disappears





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







5















jquery-3.1.0



This script adds "blablabla". But after that the page reloads.
So, the added element disappears.



When I stop in the debugger (the brekapoint is in the code), "blablabla" is vaisible, then I make step and occur somewhere in the middle of jQuery. I tried to show you where I occur.



I have removed all irrelevant scripts, but still can't localize the problem.



And of course I can't model it in jsfiddle.



Could you give me a kick here?



<script>

function show_frame_person_create_get(){
$("#people").after("blablabla");
debugger;
}


function init_frame_person_create(){
var person_create_button = $('#person_create');

person_create_button.click(show_frame_person_create_get);
}

init_frame_person_create();

</script>


jQuery.event = {
...
dispatch: function( nativeEvent ) {
// Determine handlers
handlerQueue = jQuery.event.handlers.call( this, event, handlers
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
handleObj.handler ).apply( matched.elem, args );

if ( ret !== undefined ) { // I OCCUR HERE!
);









share|improve this question


















  • 1





    can you provide fiddle

    – Nikhil Ghuse
    Sep 7 '16 at 13:16











  • jsfiddle.net/qx839j7k/12 But fiddle can't show anything here.

    – Michael
    Sep 7 '16 at 13:30











  • Can you show graphically what is happening and what you want..?

    – Nikhil Ghuse
    Sep 7 '16 at 13:47











  • are you asking why your page is reloading? Or are you asking why the element disappears? The element disappears because the page is re-loaded, obviously. But why the page re-loads is not clear from the code you've posted so far

    – ADyson
    Sep 7 '16 at 13:55











  • Is $('#person_create') by chance a button? What happens if you add a preventDefault() to show_frame_person_create_get

    – JonSG
    Sep 17 '16 at 22:09


















5















jquery-3.1.0



This script adds "blablabla". But after that the page reloads.
So, the added element disappears.



When I stop in the debugger (the brekapoint is in the code), "blablabla" is vaisible, then I make step and occur somewhere in the middle of jQuery. I tried to show you where I occur.



I have removed all irrelevant scripts, but still can't localize the problem.



And of course I can't model it in jsfiddle.



Could you give me a kick here?



<script>

function show_frame_person_create_get(){
$("#people").after("blablabla");
debugger;
}


function init_frame_person_create(){
var person_create_button = $('#person_create');

person_create_button.click(show_frame_person_create_get);
}

init_frame_person_create();

</script>


jQuery.event = {
...
dispatch: function( nativeEvent ) {
// Determine handlers
handlerQueue = jQuery.event.handlers.call( this, event, handlers
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
handleObj.handler ).apply( matched.elem, args );

if ( ret !== undefined ) { // I OCCUR HERE!
);









share|improve this question


















  • 1





    can you provide fiddle

    – Nikhil Ghuse
    Sep 7 '16 at 13:16











  • jsfiddle.net/qx839j7k/12 But fiddle can't show anything here.

    – Michael
    Sep 7 '16 at 13:30











  • Can you show graphically what is happening and what you want..?

    – Nikhil Ghuse
    Sep 7 '16 at 13:47











  • are you asking why your page is reloading? Or are you asking why the element disappears? The element disappears because the page is re-loaded, obviously. But why the page re-loads is not clear from the code you've posted so far

    – ADyson
    Sep 7 '16 at 13:55











  • Is $('#person_create') by chance a button? What happens if you add a preventDefault() to show_frame_person_create_get

    – JonSG
    Sep 17 '16 at 22:09














5












5








5








jquery-3.1.0



This script adds "blablabla". But after that the page reloads.
So, the added element disappears.



When I stop in the debugger (the brekapoint is in the code), "blablabla" is vaisible, then I make step and occur somewhere in the middle of jQuery. I tried to show you where I occur.



I have removed all irrelevant scripts, but still can't localize the problem.



And of course I can't model it in jsfiddle.



Could you give me a kick here?



<script>

function show_frame_person_create_get(){
$("#people").after("blablabla");
debugger;
}


function init_frame_person_create(){
var person_create_button = $('#person_create');

person_create_button.click(show_frame_person_create_get);
}

init_frame_person_create();

</script>


jQuery.event = {
...
dispatch: function( nativeEvent ) {
// Determine handlers
handlerQueue = jQuery.event.handlers.call( this, event, handlers
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
handleObj.handler ).apply( matched.elem, args );

if ( ret !== undefined ) { // I OCCUR HERE!
);









share|improve this question














jquery-3.1.0



This script adds "blablabla". But after that the page reloads.
So, the added element disappears.



When I stop in the debugger (the brekapoint is in the code), "blablabla" is vaisible, then I make step and occur somewhere in the middle of jQuery. I tried to show you where I occur.



I have removed all irrelevant scripts, but still can't localize the problem.



And of course I can't model it in jsfiddle.



Could you give me a kick here?



<script>

function show_frame_person_create_get(){
$("#people").after("blablabla");
debugger;
}


function init_frame_person_create(){
var person_create_button = $('#person_create');

person_create_button.click(show_frame_person_create_get);
}

init_frame_person_create();

</script>


jQuery.event = {
...
dispatch: function( nativeEvent ) {
// Determine handlers
handlerQueue = jQuery.event.handlers.call( this, event, handlers
ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
handleObj.handler ).apply( matched.elem, args );

if ( ret !== undefined ) { // I OCCUR HERE!
);






javascript jquery






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 7 '16 at 13:13









MichaelMichael

1,3501629




1,3501629








  • 1





    can you provide fiddle

    – Nikhil Ghuse
    Sep 7 '16 at 13:16











  • jsfiddle.net/qx839j7k/12 But fiddle can't show anything here.

    – Michael
    Sep 7 '16 at 13:30











  • Can you show graphically what is happening and what you want..?

    – Nikhil Ghuse
    Sep 7 '16 at 13:47











  • are you asking why your page is reloading? Or are you asking why the element disappears? The element disappears because the page is re-loaded, obviously. But why the page re-loads is not clear from the code you've posted so far

    – ADyson
    Sep 7 '16 at 13:55











  • Is $('#person_create') by chance a button? What happens if you add a preventDefault() to show_frame_person_create_get

    – JonSG
    Sep 17 '16 at 22:09














  • 1





    can you provide fiddle

    – Nikhil Ghuse
    Sep 7 '16 at 13:16











  • jsfiddle.net/qx839j7k/12 But fiddle can't show anything here.

    – Michael
    Sep 7 '16 at 13:30











  • Can you show graphically what is happening and what you want..?

    – Nikhil Ghuse
    Sep 7 '16 at 13:47











  • are you asking why your page is reloading? Or are you asking why the element disappears? The element disappears because the page is re-loaded, obviously. But why the page re-loads is not clear from the code you've posted so far

    – ADyson
    Sep 7 '16 at 13:55











  • Is $('#person_create') by chance a button? What happens if you add a preventDefault() to show_frame_person_create_get

    – JonSG
    Sep 17 '16 at 22:09








1




1





can you provide fiddle

– Nikhil Ghuse
Sep 7 '16 at 13:16





can you provide fiddle

– Nikhil Ghuse
Sep 7 '16 at 13:16













jsfiddle.net/qx839j7k/12 But fiddle can't show anything here.

– Michael
Sep 7 '16 at 13:30





jsfiddle.net/qx839j7k/12 But fiddle can't show anything here.

– Michael
Sep 7 '16 at 13:30













Can you show graphically what is happening and what you want..?

– Nikhil Ghuse
Sep 7 '16 at 13:47





Can you show graphically what is happening and what you want..?

– Nikhil Ghuse
Sep 7 '16 at 13:47













are you asking why your page is reloading? Or are you asking why the element disappears? The element disappears because the page is re-loaded, obviously. But why the page re-loads is not clear from the code you've posted so far

– ADyson
Sep 7 '16 at 13:55





are you asking why your page is reloading? Or are you asking why the element disappears? The element disappears because the page is re-loaded, obviously. But why the page re-loads is not clear from the code you've posted so far

– ADyson
Sep 7 '16 at 13:55













Is $('#person_create') by chance a button? What happens if you add a preventDefault() to show_frame_person_create_get

– JonSG
Sep 17 '16 at 22:09





Is $('#person_create') by chance a button? What happens if you add a preventDefault() to show_frame_person_create_get

– JonSG
Sep 17 '16 at 22:09












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39370898%2fhow-to-diagnose-why-added-element-disappears%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39370898%2fhow-to-diagnose-why-added-element-disappears%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)