We propose a new multiplex community affiliation clustering method for the analysis of dynamic social networks. The method involves two-stage clustering to find groups of similar network layers, and groups of associated nodes within each layer of a multiplex social network. Using simulated data, we show that our method is able to capture the dynamics of politician intra- and inter-party community formation in a model in which party cohesion is driven by changes in issue salience. Using Twitter data on UK and US legislators, we find that political events increase the salience of certain issues and produce episodic changes in the community structure, which we are able to capture through our method. We benchmark our results against other measures of party cohesion such as legislative member organizations, roll call votes, and surveys of legislators, and discuss the advantages and disadvantages of each method.