Adobe Dreamweaver API Reference CS5 Instrukcja Użytkownika Strona 424

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 533
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 423
419
DREAMWEAVER API REFERENCE
Design
Last updated 8/27/2013
Media Query
dw.mediaQueryListToJSON(strMediaQueryList)
Availability
Dreamweaver CS5.5.
Description
Parses a Media Query List string and returns a JSON string to the caller.
Arguments
strMediaQueryList A string that is a Media Query list, similar to the media attribute of a link tag.
Returns
A JSON string that represents the parsed Media Query List. The caller can inspect this string and/or call eval to
convert it into a JavaScript object.
If an error is encountered while parsing, the caller can use errorStr, a JSON object, for testing. If this property is non-
existent or empty, there will be no error. When the parsing succeeds, the JSON object will have property called
mediaQueryList, which is an array.
Example
var strJSON = dw.mediaQueryListToJSON('only screen and (min-width:769px)');
//strJSON is now:
{ mediaQueryList : [ { restrictor : 'only',
mediaType : 'screen',
mediaFeatures : [ { feature : 'width', comparisonType : 'min', value
: '769px' } ] }
],
errorStr : ''
}
site.getMediaQueryFile()
Availability
Dreamweaver CS5.5.
Description
Provides the location of the site-wide media query file for the current site. For example, C:\Documents and
Settings\username\My Documents\dw sites\slash site\css\devices.css.
Returns
String with full path of the SWMQF.
Przeglądanie stron 423
1 2 ... 419 420 421 422 423 424 425 426 427 428 429 ... 532 533

Komentarze do niniejszej Instrukcji

Brak uwag