Description

Add a rel attribute when the input, textarea, or option has a value and is active (selected or checked if applicable). This method can be used to ensure the value property is consistent with the RDFa attributes.

Signature


calli.updateResource(event, rel)
Parameter Description
event HTML event
rel CURIE of @rel value

Example


<div class="form-group">
    <label for="support">Support</label>
    <div id="support">
        <div class="checkbox">
            <label>
                <input type="checkbox" name="support" resource="http://www.w3.org/ns/sparql-service-description#SPARQL11Query"
                    onchange="calli.updateResource(event, 'sd:supportedLanguage')" />
                <span>SPARQL Query</span>
            </label>
        </div>
        <div class="checkbox">
            <label>
                <input type="checkbox" name="support" resource="http://www.w3.org/ns/sparql-service-description#SPARQL11Update"
                    onchange="calli.updateResource(event, 'sd:supportedLanguage')" />
                <span>SPARQL Update</span>
            </label>
        </div>
    </div>
    <div class="hidden" rel="sd:supportedLanguage" resource="?support"></div>
    <script type="text/javascript">
        $('[rel="sd:supportedLanguage"].hidden').filter(calli.checkEachResourceIn('#support')).remove();
    </script>
</div>