Giter VIP home page Giter VIP logo

nodejs-ajax-search-bar's Introduction

#tutorial is here : http://kodizim.com nodejs ajax search bar with javascript ,juquery and mysql database you can firstly look this project cause this project contain other project

Requirements

Server Side

module.exports = {
    'connection': {
        'host': '127.0.0.1', 
        'user': 'root', // username
        'password': 'pass', // password 
        'database': 'dbname'// database name
    },
	'database': 'dbname',
};

Do you want to insert row your database click this link and run querys

example

CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL,
  `surname` varchar(20) NOT NULL,
  `username` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
insert into users(name,surname,username) values("Jamie","Lannister","JamieLannister");
insert into users(name,surname,username) values("Cercei","Lannister","CerceiLannister");
insert into users(name,surname,username) values("Bronn","Bronn","Bronn");
insert into users(name,surname,username) values("John","Snow","JohnSnow");
insert into users(name,surname,username) values("Daenerys","Targaryen","DaenerysTargaryen");
insert into users(name,surname,username) values("Ramsay","Bolton","JamieLannister")

for security

  var corsOptions = {
        origin: 'http://localhost:3000',
        optionsSuccessStatus: 200 
    }

routes.js

Client Side

modal load when you click search box or modal unload and visibility hidden when you click without search box

var $modal = $('div.load');
    $('#search').click(function () {
        console.log("search click");
        $modal.fadeIn();
    });
    $(document).mouseup(function (e) {
        if (!$(e.target).is('#search *, #search')) {
            console.log("normal click");
            $("#user").removeClass("deneme");
            $modal.fadeOut(100);
        }
    });

nodejs-ajax-search-bar's People

Contributors

mustafa05deniz avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

khaled-anika

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.