The first electronic flip-flop was invented in 1919 by William Eccles and F. W. Jordan[1]. It was initially called the Eccles-Jordan trigger circuit and consisted of two active elements (radio-tubes). The name flip-flop was later derived from the sound produced on a speaker connected with one of the backcoupled amplifiers output during the trigger process within the circuit. Note that this original flip-flop was transparent and thus probably would be labeled latch today (see here).

The symbol for a JK Flip Flop with SR latch. Its typical to see the SR latch as a part of/built in to a JK flip flop device as the root of the JK is the SR.

For the most part the J K flip flop is the same as a SR latch except that when both inputs are high the output will toggle with the clock rather than being an unstable state as with the SR latch. Some flip flops also feature a preset and clear pin which operates asynchronously to the clock. Setting preset high will set Q high and clear will set Q clear regardless of the clock state.[1] For devices with a clock input it may be needed to tie the clock high or low (active low clock pin).
2-6V (TI CD74HC112)
3-18V (TI CD4027)

An edge trigger flip flop. Assuming the input port named "D", controlling signal named "clk" and the output port named "Q"; then @edge of clk (positive edge or negative edge according to flip flop design) the output "Q" takes the value of the input "D"; otherwise the output "Q" sustains its value.

D-flip flop operation(positive edge)

clk

D

Q

Q

positive edge

0

0

1

positive edge

1

1

0

otherwise

0 or 1

Keep previous state

Keep previous state

notice that the flip flop senses the "D" at the edge of "clk"; thus any changes occurs in "D" value at any other time is ignored

logic components

it's a JK flip flop with "J" connected to the input "D" and "K" connected to the inverted value of input "D".