Tag Info

Hot answers tagged

1

Try using below code if($("input[Id^='Title']").val().trim() == "") { bvalSubmit = false; }


1

ScriptLink directives will always look in the /_LAYOUTS/1033 directory for your script. If you are not deploying the files to the file system and instead using the Style Library, you need to use the standard <script> tag. <script type="text/javascript" src="http://2008-sp-2013-jc/sites/labeller/Style%20Library/jquery-min.js"></script> ...


1

SharePoint renders dropdowns differently in Internet Explorer depending on whether they have fewer than 20 options or 20+ options. (In Firefox, Chrome, and other browsers, SharePoint doesn’t give us this “benefit”.) You can use SPComplexToSimpleDropdown function as below: How Does It Work? The SPComplexToSimpleDropdown function works like this: When the ...


1

This will work only if the drop-down control has an option with empty value. Try below $("select[title='"+Hide_Column+"']").val(''); Another option is to select the first option as below $("select[title='"+Hide_Column+"']").find('option:eq(0)').prop('selected', true);


1

The follwoing code will try to load JQuery from Google CDN. If it fails, then it will look for a local copy of JQuery: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script> <script> window.jQuery || document.write('<script src="/_layouts/15/JQuery/jquery-1.7.1.min.js" ...


1

Here is script you can use to dynamically load jQuery if it not present. // Only do anything if jQuery isn't defined if (typeof jQuery == 'undefined') { if (typeof $ == 'function') { // warning, global var thisPageUsingOtherJSLibrary = true; } function getScript(url, success) { var script = ...



Only top voted, non community-wiki answers of a minimum length are eligible