English 中文(简体)
• 如何将j Query 选任者min魔化?
原标题:How to minify jQuery selectors?

I m wondering how to minify jQuery selectors:

     $("#foo_1").show();

     $("#foo_2").show();

     $("#foo_3").show();

     $("#foo_4").show();

     $("#foo_5").show();
最佳回答

肯定不是你要求什么,但你可以这样做:

 $("#foo_1, #foo_2, #foo_3, #foo_4, #foo_5").show();

或者,你可以就所有物体采用相同的<代码>}=“foo”,并且:

 $(".foo").show();
问题回答

即便是你min笑或混淆你的 j子,因为甄选者是需要绘制实际的OMM地图的甄选者,你也可以改变甄选者自己。





相关问题
Optimizing a LAN server for a game

I m the network programmer on a school game project. We want to have up to 16 players at once on a LAN. I am using the Server-Client model and am creating a new thread per client that joins. ...

SQL Table Size And Query Performance

We have a number of items coming in from a web service; each item containing an unknown number of properties. We are storing them in a database with the following Schema. Items - ItemID - ...

Most optimized way to store crawler states?

I m currently writing a web crawler (using the python framework scrapy). Recently I had to implement a pause/resume system. The solution I implemented is of the simplest kind and, basically, stores ...

Do bitwise operations distribute over addition?

I m looking at an algorithm I m trying to optimize, and it s basically a lot of bit twiddling, followed by some additions in a tight feedback. If I could use carry-save addition for the adders, it ...

Improve INSERT-per-second performance of SQLite

Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per second! Background: We are using SQLite as part of a desktop ...

Profiling Vim startup time

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签