I can tell you from experience "take her to the doctor".
The stinging is probably from those little cuts and tears from straining. It hurts!
My son is currently going through this. Gastro dr. said worst thing is kids remember this and start withholding and that makes it worse. My son now sits on the toilet 30 minutes after meals whether he has to go or not, plays a video game or reads etc...to learn to relax and NOT RUSH while sitting there. Too many times children are in a rush and let out that first bit to relieve that feeling and then think they are done and stop. That leads to constipation.
Children should have in grams of fiber, their age plus 5. I'd add 1-2 oz. of prune juice, increase water, exercise etc.
The jelly like stuff is probably like what someone else said, there is blockage in there and that's leaking around it. I had to do the enema first with my son, and now we are watching his diet, etc.etc...currently he's on miralax for a few months now and we are tapering off in a 4 week period and seeing how he does and have added the prune juice..
Hope your daughter gets better. Let us know how she is!