The sequence of events is not very clear from your description but it seems you had a seizure
. The shaking and inability to recall some events during that period are supportive of that possibility. Another possibility is that it could have been syncope
. in either case you need to consult a doctor who can examine you and order some of the investigations which are required to reach at a conclusion.