Jamil Hallal's Blog

  • Avoid Case Sensitive in Silverlight QueryString

    In Silverlight and when querying parameters from the query string on the current page's URL you will notice that the keys are case sensitive, to bypass this issue use the below code: var queryParams = new Dictionary(HtmlPage.Document.QueryString, StringComparer.InvariantCultureIgnoreCase); if (queryParams.ContainsKey("svcid")) { //Your code here. }


  • jQuery Selectors

    jquery selectors are the most important aspects of the jquery Library. On top of standard CSS selectors jquery introduces some custom selectors that makes your code even more simpler and easier to read. Below is a summary table of the jquery selectors






    All elements



    The element with id=lastname



    All elements with class="intro"



    All p elements



    All elements with the classes "intro" and "demo"






    The first p element



    The last p element



    All even tr elements



    All odd tr elements





    $("ul li:eq(3)")

    The fourth element in a list (index starts at 0)


    $("ul li:gt(3)")

    List elements with an index greater than 3


    $("ul li:lt(3)")

    List elements with an index less than 3



    All input elements that are not empty






    All header elements h1, h2 ...



    All animated elements






    All elements which contains the text



    All elements with no child (elements) nodes



    All hidden p elements



    All visible tables






    All elements with matching selectors






    All elements with a href attribute



    All elements with a href attribute value equal to "default.htm"



    All elements with a href attribute value not equal to "default.htm"



    All elements with a href attribute value ending with ".jpg"






    All input elements



    All input elements with type="text"



    All input elements with type="password"



    All input elements with type="radio"



    All input elements with type="checkbox"



    All input elements with type="submit"



    All input elements with type="reset"



    All input elements with type="button"



    All input elements with type="image"



    All input elements with type="file"






    All enabled input elements



    All disabled input elements



    All selected input elements



    All checked input elements

    References :