Home > Sonal Jatav

Ecmascript 6: Scoping – Block scoped variable

Javascript followed function level and global scope for a very long time which created a lot of problems. Developers could declare a variable anywhere as global and variables lived even outside loops and if else blocks because of the function level scope. Ecmascript 6 came up with support for block level

This Article is TAGGED in , , . Read more

Calculate height and width of an element with respect to window/document height and width

Get height of window $(window).height(): Returns height of visible viewport/screen (does not include height of scrollable content) Get height of the page $(document).height(): Returns height of the length of the content/page (includes the height of the scrollable content) Get width of window $(window).width(): Returns width of visible viewport minus width of scrollbar

This Article is TAGGED in , , . Read more

Add Videos using media upload URL in WordPress

We have seen how to add WordPress media upload button in a page or metabox. You can find the steps here. Similarly you can also add a media upload button for videos, since the above link has media upload type as image media-upload.php?type=image&TB_iframe=true How do we upload videos instead? Follow the steps

This Article is TAGGED in , , . Read more

Selectors! Types and difference

Basic Selectors:Universal Selector: [crayon-673365ca2b048274519046/]ID, Class Selector[crayon-673365ca2b04c651979087/]Element/ Tag Selector[crayon-673365ca2b04d652923871/]Attribute Selector[crayon-673365ca2b04f681063127/]Descendant Selector: Selects all elements(any level deep) that are under the selector. For ex. following code will select all the span elements that are inside div element.[crayon-673365ca2b051853765008/]Child Selector: Selects all elements that are one level under the selector. For ex. following code will select all the span elements at

Read more

Javascript window.location.hash

Javascript window.location.hash returns the value of URL that comes after "#"For ex.             https://mundrisoft.com/tech-bytes/wp-admin/post-new.php#searchtermwindow.location.hash will return "#searchterm" in browsers IE 11, Edge and Chrome  and Mozilla For an empty hash URL:          https://mundrisoft.com/tech-bytes/wp-admin/post-new.php#window.location.hash will return"#" -> Chrome, Mozilla, IE 11"" -> EdgeSo, keep this little

This Article is TAGGED in , , , . Read more

How to add CSS link to master page, page layout and page in Sharepoint publishing sites

How to add CSS link reference to Master Page, Page Layout, Page in a Sharepoint Publishing site?1. Master Page: Add the following code inside <head> tags[crayon-673365ca2b178637134730/]2. Page Layout:Add below code after <!--ME:</Publishing:EditModePanel>--> tag in your Page Layout[crayon-673365ca2b17b925332176/]3. Pages: Add below code after <!--MS:<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server">--> tag in Page[crayon-673365ca2b17d392137935/]  

This Article is TAGGED in , , , , , . Read more

WordPress – Jquery get dynamic urls(admin_url, template_directory)

WordPress provides a series of methods and global variables for getting the current url, template directory, plugin directory, includes directory, admin directory that saves us from using absolute paths. On the other hand JQuery under wordpress does not include such urls so we end up using absolute urls. A workaround for this

This Article is TAGGED in , , , . Read more

WordPress SEO – Categories and Tags

What are WordPress Categories?Categories in a post organizes a post into a section of posts that share a context. For ex. Technical, Psychology, Medical. All posts that talk about WordPress will belong to category Technical, WordPress, WordPress Multisite. What are WordPress Tags?Tags in a post are words or phrases that describe the content

This Article is TAGGED in , , , , , . Read more