task

code notes -

[previously]

  1. [] $.post - great example - submit form without re-directing
    1. ] add on submit event to form, prevent default event,  
    2. ] REF = stack overflow
  2. [2015-03-05] jquery replaceWith("insert something") VERSUS .html("insert some html")
    1. ] .replaceWith() replaces the div element
    2. ] .html() - replace the content inside the exisiting div element
    3. ] REF = http://stackoverflow.com/questions/730916/whats-the-difference-between-jquerys-replacewith-and-html 
  3. [2015-03-05] reposition to original position in page after a post is submitted research
    1. ] save scroll postion before click event,
      1. ] var tempScrollTop = $(window).scrollTop();
      2. ] ..//Your code
      3. ] $(window).scrollTop(tempScrollTop);
      4. ] REF = javascript - How to maintain page scroll position after a jquery event is carried out - Stack Overflow
    2. >] javascript:void(0) - IF element is an "a" element - WOOT, this is the easiest and it works
      1. ] href="javascript:void(0)" VS href="#"
      2. ] REF = http://stackoverflow.com/questions/10836428/how-to-maintain-page-scroll-position-after-a-jquery-event-is-carried-out 
  4. [reposition] navigation TRY
    1. ] // PASS - window.location.href = "index.cshtml/#getEmail"; BUT reloads the page
    2. ] // FAIL - window.location.hash = "#getEmail";
    3. ] using scrollIntoView
    4. ] // FAIL - var moveBack = document.getElementById("getEmail"); This should work but doesnt, problematic api (ie ?, )
      1. ] moveBack.scrollIntoView(true);
    5. ] // FAIL - document.getEmail.scrollIntoView();

[currently]

  1. ]  

[next]

  1. ]
Details Photos Edit more

Details

ID: 4853

NAME: js-lessons

DESCRIPTION: ] jquery replaceWith vs html ]

START DATE TIME: 2015-03-05 16:36:56

EST DURATION: 01:00:00

END DATE TIME: 2015-03-05 17:36:56

STATUS:

PRIORITY: -5

OWNER ID: 1

Content Photos Edit more

photos

photos for this task

actions

Agenda Email task SMS task Priorities