Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i work the filter by select option not a buttons #16

Closed
MuhammadEid opened this issue May 14, 2016 · 18 comments
Closed

How can i work the filter by select option not a buttons #16

MuhammadEid opened this issue May 14, 2016 · 18 comments

Comments

@MuhammadEid
Copy link

Dear all how can i select the filter by select option not a buttons because i have more more items and i want to select filter by option

thanks waiting your replay

@mmkaw
Copy link

mmkaw commented May 14, 2016

you need to change 2 lines of code in the filterizr file. if owner @giotiskl allows, i will post images to show the lines. its simple you need to implement "on change" event instead of "click event" and assign the value to targetFilter variable. its working but i have not tested thoroughly.

@MuhammadEid
Copy link
Author

thanks so much i hope it will allow because i have project and need multi filter not single hope he will

thanks so much again

@giotiskl
Copy link
Owner

giotiskl commented May 14, 2016

@MuhammadEid actually this would be quite easy, you could just add a custom data-filter attribute to the tags with the values set to the categories towards which you want to filter and then check in your script when the select changes the option and call the public filter method fltr.filterizr('filter', targetfilter);
Otherwise, you can follow mmkaw's solution, which of course he can publish :) Filterizr is free and open in every aspect so please go right ahead @mmkaw

@mmkaw
Copy link

mmkaw commented May 14, 2016

filterzr1

@mmkaw
Copy link

mmkaw commented May 14, 2016

filterzr2

@MuhammadEid
Copy link
Author

Dear all i was change what need to do like steps you told me

JS Code
//Filter controls
filteritems2.onchange = function() {
var targetFilter = $('#filteritems2').val();
$(this).addClass("active");
//Exit case
if (self.options.filter === targetFilter) return;
self.filter(targetFilter);
});

HTML Code

Volvo Saab Opel Audi

any mistake thanks i'm waiting

@mmkaw
Copy link

mmkaw commented May 14, 2016

is it not working?

@MuhammadEid
Copy link
Author

Yes @mmkaw not working i was change everythink HTML and JS code

@giotiskl
Copy link
Owner

do you get any errors in your dev console @MuhammadEid ?

@MuhammadEid
Copy link
Author

MuhammadEid commented May 14, 2016

thanks @giotiskl and @mmkaw for every help that is my screens

111222333

@mmkaw
Copy link

mmkaw commented May 14, 2016

whats the error message?

@MuhammadEid
Copy link
Author

111222

@MuhammadEid
Copy link
Author

111

@mmkaw
Copy link

mmkaw commented May 14, 2016

remove bracket and semi coma ");" from line 466. its just close braces "}"

@mmkaw
Copy link

mmkaw commented May 14, 2016

filterzr1

@MuhammadEid
Copy link
Author

Yes It's Working thanks so so so much @mmkaw and @giotiskl for your support me it's working oooooooooooooo thankkkkks

@mmkaw
Copy link

mmkaw commented May 14, 2016

welcome, thanks to owner for this plugin.

@giotiskl
Copy link
Owner

giotiskl commented May 14, 2016

Good to see it is working :) Thanks for your help @mmkaw
@MuhammadEid, if you enjoyed Filterizr, make sure to star the repo and be kept posted of future updates, have fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants