php - Algorithm to stop flickering (clear box and re-populate) when adding text -
i wondering if there's algorithm or resource @ changes made ajax request , not update whole box (causing flicker) add/remove changes made.
this used keypress command.
a example stack overflows "preview" doesn't flicker when add more text parses text adds (though i'm not sure uses ajax in stackoverflow's case).
i'm using jquery so: $('#content').html(response);
thanks! matt mueller
the best (most flexible way) accomplish break target , response chunks. returning json object {object-id: 'html source', ...}
, checking if each object has changes associated before updating.
i'm guessing want catch-all parsing-solution, text-difference scanner update changed portions - creates more inflexible problems. because done through ajax call, it's hard determine returned (if it's valid request or not), , how of has changed.
for reference, preview on uses attacklab's showdown, pure-javascript parse.
Comments
Post a Comment