Skip to content

NIT.js works some how like jquery but with more included functions to help you in your project

License

Notifications You must be signed in to change notification settings

binarique/NIT-1.0.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NIT-1.0.js

NIT.js works some how like jquery but with more included functions to help you in your project try this:

<title>Demo</title> <script type="text/javascript" src="js/NIT-1.0.js"></script> <style type="text/css"> body{ font-family: sans-serif; margin-left: 30px; text-align: center; margin-top: 10px; background-color: #f0f0f0; } p ,button{ background-color: #6078ea; color: #fff; padding: 5px 5px 5px 5px; font-family: sans-serif; border-radius: 6px; cursor: pointer; } .bs-card{ height: 350px; } </style>

Am supposed to be a card

can you please click the button below and make me a card

MakeCard

setBackgroundImage
hide show LOAD NEW DATA <script type="text/javascript"> main(function(){ //make cards $("p").toggle(function(event){ event.preventDefault(); $(".bs-card").css({ 'padding':'5px 5px 5px 5px', 'background-color':'#ffffff', 'border': '1px solid #ccc', 'box-shadow':'0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19) !important', }); });

//set back ground image $("#setbackground").on('click',function(){ $(".bs-card").setBackgroundImage("img/phone.jpg"); }); //hide card $(".hide-card").on('click',function(){ $(".bs-card").hide(); }) //show $(".show-card").on('click',function(){ $(".bs-card").show(); }) //ajax stuff $("#loadNew").on('click',function(){ $ajax({ url : 'demo.php', method: 'POST', data : {userName:"walulya francis"}, success:function(data){ $(".bs-card").html(data); } });

});

});

</script>

YOU CAN EXPERIMENT WITH THE FOLLOWING FUNCTION

 .hide()
 .show()
 //with speed
 .hide(2000)//2seconds to hide
 .show(3000) //3seconds to show
 .attr(name,value)
.isChecked()
.add(className)
empty(fileldName) returns true or false
//ajax support
//POST
$ajax({
    url : 'demo.php',
    method: 'POST',
    data : {userName:"walulya francis"},
    success:function(data){
        $(".bs-card").html(data);
      }
   });
   //GET
   $ajax({
    url : 'demo.php',
    method: 'GET',
    data : {userName:"walulya francis"},
    success:function(data){
        $(".bs-card").html(data);
      }
   });
   //JSON support   $ajax({
    url : 'demo.php',
    method: 'GET',
    data : {userName:"walulya francis"},
    type : 'JSON',
    success:function(data){
        $(".bs-card").html(data);
      }
   });

PLEASE GUYZ CONTRIBUTE TO THIS PROJECT,THANK U

About

NIT.js works some how like jquery but with more included functions to help you in your project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published