Home > UI/UX Development > JavaScript (Page 4)

Add custom filter on list with paging in angular material

we have angular object  [crayon-6890c2389b79f580991250/] In above, we have one pages objects which stores page list and page count. Consider, we have page status filters. which values is stored in 'filterData.selectedPageStatus' object that is we are passing to page custom filter. so out html looks like below [crayon-6890c2389b7a5964864725/] Now, add below code in app.js [crayon-6890c2389b7a7966842251/] Here we done.  Please

This Article is TAGGED in . Read more

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

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

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

Web Developer Pre-release Testing Checklist

When we talk about an emerging full-stack web developer, there are certain things that are bound to be missed owing to a developer background and a programmer mindset. A checklist with all things that should be considered before release to QA or launch will help a developer to deliver a not

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

set maxlength to all textbox/textarea in application using jquery.

Add a textbox with id and maxlength attributes like [crayon-6890c2389c68a158052581/] add following code in js file. (this code find all textbox/textarea in application and append div(charleft) to the textbox/textarea.) [crayon-6890c2389c68e593369525/]   and add following css [crayon-6890c2389c691111325614/] :)  

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