Did the recipients of the Nobel Prize in physics for the electroweak theory work independently of each other?

Did these scientists know about each other's work and consult from each other or did they discover the electroweak theory each independent of the other?

Below is a quote from nobelprize.org.

According to modern physics, four fundamental forces exist in nature. Electromagnetic interaction is one of these. The weak interaction - responsible, for example, for the beta decay of nuclei - is another. Thanks to contributions made by Abdus Salam, Sheldon Glashow,and Steven Weinberg in 1968, these two interactions were unified to one single, called electroweak. The theory predicted, for example, that weak interaction manifests itself in "neutral weak currents" when certain elementary particles interact. This was later confirmed.

More or less. Glashow produced an early blueprint in 1961 before the Higgs mechanism was worked out, unaware of it Salam and Ward reproduced it in 1964. Weinberg and Salam presented the final theory independently in 1967. However, they knew each other well, and collaborated on some papers since 1962, so were likely aware of each other's thinking. After a key experimental confirmation in 1973 the Nobel prize was awarded in 1979, Ward was left out.

Kibble has helpful notes on History of Electroweak Symmetry Breaking, based, in part, on personal recollections. Here are the relevant parts:

"Glashow (1961) proposed a model with symmetry group $$SU(2)\times U(1)$$ and a fourth gauge boson $$Z^0$$, showing that the parity problem could be solved by a mixing between the two neutral gauge bosons. Salam and Ward (1964), unaware of Glashow's work, proposed a similar model, also based on $$SU(2)\times U(1)$$. Salam was convinced that a unified theory must be a gauge theory... But in all these models symmetry breaking, giving the $$W$$ bosons masses, had to be inserted by hand — spin-$$1$$ bosons with explicit mass were known to be non-renormalizable.

[...] By 1964 both the [Higgs] mechanism and Glashow’s (and Salam and Ward’s) $$SU(2)\times U(1)$$ model were in place, but it still took three more years to put the two together. Unified model of weak and electromagnetic interactions of leptons proposed by Weinberg (1967) — essentially the same model was presented independently by Salam in lectures at IC in autumn of 1967 and published in a Nobel symposium in 1968 — he called it the electroweak theory.

[...] Salam and Weinberg speculated that their theory was renormalizable. This was proved by Gerard ’t Hooft in 1971 — a tour de force using methods of his supervisor, Tini Veltman, especially Schoonschip. In 1973 the key prediction of the theory, the existence of neutral current interactions — those mediated by $$Z^0$$ — was confirmed at CERN. This led to the Nobel Prize for Glashow, Salam & Weinberg in 1979 — but Ward was left out (because of the ‘rule of three’?). ’t Hooft and Veltman gained their Nobel Prizes in 1999. In 1983 the $$W$$ and $$Z$$ particles were discovered at CERN."

Did these scientists know about each other's work and consult from each other or did they discover the electroweak theory each independent of the other?

It's actually quite a common occurrence for researchers working independently to come up with solutions more or less around the same time; the most famous example is of Newton and Liebniz with the calculus, but one could also mention the Higgs mechanism, or the knot polynomial; or as here, the unified electroweak theory.

This is simply because in any field the most important questions are well-known, moreover, every serious researcher knows what possible techniques can be used. For example here, Salam and Weinberg would have both seen the work on how spontaneously symmetry breaking gives mass to bosons and and how QED was the first successful quantised field theory. Moreover, they would have known of each others work, as its likely they would be publishing in the same journals and the serious theoretical physics world is actually quite a small one.