Sunday 15 March 2015

Adding listener to matchMedia.js polyfill issue -


I am experimenting with the audience expansion, however, I do not know how to write a listener for the match media query .

js:
  if (match media ("(minimum-width: 52 AM)").) ($) ($ ("Description") .attr ( "Open", "Open");}    

  var handelmedia = function (MQL) {if (mql.matches) {// do match actions} else {// unmatch actions}}, myMediaQuery = window.matchMedia ('(min-width: 52em)'); handleMyMediaQuery (myMediaQuery); myMediaQuery AddListener (handleMyMediaQuery);   

The first use of 'MediaMediaMedia' checks for the media queries immediately and the other 'myMediaQuery.addListener' (trigonous) When the media matches the query and then the media query does not match.

Hopefully that makes sense.

No comments:

Post a Comment