jQuery Selector fundametals

jQuery Selector :-¬† jQuery selector work as a CSS selector . CSS selector is used to add style to the HTML Page while jQuery selector is used to add behaviors to the HTML Page.¬† Selecting Elements by JavaScript Selecting Elements by jQuery document.getElementsByTagName(“p”)[0].innerHTML = “Change the page.”; $(“p”).html(“Change the page.”); for (i = 0; i <= 4; i++){document.getElementsByTagName(“p”)[i].innerHTML=”Change the page”;

Read more

Difference between .html() and .text() functions in jQuery

Difference between .html() and .text() functions in jquery: .html() can be used to get the contents of inside an element. If your selector expression matches more than one element, only the first match will have its HTML content returned: here is an example: list sample 1 list sample 2 list sample 3 now if you are using .html(): $(‘.html-function-demo’).html(); your

Read more

Changing The Value Of a Div on Click of a Button From a Set of Radio Button Using jQuery

Changing the value of a div on click of a button from a set of radio button using jquery: <div> <ul> <li><input type=”radio” value=”radio1″ name=”demoChangeFunc” /></li> <li><input type=”radio” value=”radio2″ name=”demoChangeFunc” /></li> <li><input type=”radio” value=”radio3″ name=”demoChangeFunc” /></li> <li><input type=”radio” value=”radio4″ name=”demoChangeFunc” /></li> </ul> <div></div> </div> $(‘.radio-button-demo input’).each(function() { if($(this).attr(‘checked’,’checked’)){ $(‘.list-value’).text($(this).attr(‘value’)); } })

Read more

Working With Elements Inside An iFrame In An Html Page

Working with elements inside an iFrame in an html page when you want to have a new page load as an HTML instead of using ajax calls to load appending an html page to the existing page and using css to display it. Step 1. in index.html page of your application including as many iframes as possible in following manner you

Read more