tags:

views:

13

answers:

0

i have been searching for the correct method of detecting method of Firefox using Feature Based Sniffing any Script that can help me with that help will be appreciated..!!

Edited:

Ok here is a Solution i cameup with that will Detect and tell with Indication of 0 or 1 for a CSS feature thats only avaliable in Firefox and that will help to detect:

<script type="text/javascript">
<!--
var CheckSet =
{
       'Propeties': [
        {Property: 'azimuth', 'Result': 0},
        {Property: 'pitch', 'Result': 0},
        {Property: 'speakHeader', 'Result': 0},
        {Property: 'speakNumeral', 'Result': 0},
    ],
};

function CheckProperty(object, featureSet)
{
    var loop;
    var features = CheckSet[featureSet];
    var level = 0;

    if (!features)
        return level;

    for (loop = 0; loop < features.length; loop++)
        if (typeof(object[features[loop].Property]) != 'undefined')
        {
            features[loop].Result = 1;
            ++level;
        }

    for (loop = 0; loop < features.length; loop++)
      {
        if (features[loop].Result == 1)
              document.write('' + features[loop].Property + '-----' + features[loop].Result + '<br>');
        else
            document.write('' + features[loop].Property + '------' + features[loop].Result + '<br>');
      }
}

CheckProperty(document.body.style,'Propeties');

//-->
</script> ​

Its Working Example can be find at : http://jsfiddle.net/rrsav/4/